deepthi912 commented on code in PR #17458:
URL: https://github.com/apache/pinot/pull/17458#discussion_r2677608225


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes.java:
##########
@@ -375,17 +375,20 @@ protected void 
revertCurrentSegmentUpsertMetadata(IndexSegment oldSegment, Threa
     // Revert to previous locations present in other segment
     for (Map.Entry<Object, RecordLocation> obj : 
_previousKeyToRecordLocationMap.entrySet()) {
       IndexSegment prevSegment = obj.getValue().getSegment();
+      IndexSegment currentLocation = obj.getValue().getSegment();

Review Comment:
   Not This change but updated check ensures that the current location of the 
key is in the segment that is getting reverted and replaced with the valid doc. 
Let's say a new immutable segment is pushed with a segment of greater time 
stamp than the one that's consuming. The current location would be with pushed 
segment but not with the current consuming segment. So this check will ensure 
when updating the valid doc we get the right location and right segment from 
consuming segment



-- 
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]

Reply via email to