raghavgautam commented on code in PR #10639:
URL: https://github.com/apache/pinot/pull/10639#discussion_r1174185026
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/dedup/PartitionDedupMetadataManager.java:
##########
@@ -114,12 +146,13 @@ public PrimaryKey next() {
}
public boolean checkRecordPresentOrUpdate(PrimaryKey pk, IndexSegment
indexSegment) {
- boolean present =
- _primaryKeyToSegmentMap.putIfAbsent(HashUtils.hashPrimaryKey(pk,
_hashFunction), indexSegment) != null;
- if (!present) {
+ byte[] keyBytes = serializePrimaryKey(HashUtils.hashPrimaryKey(pk,
_dedupConfig.getHashFunction()));
+ if (Objects.isNull(_keyValueStore.get(keyBytes))) {
Review Comment:
Will fix this by bringing back the putIfAbsent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]