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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes.java:
##########
@@ -270,20 +274,6 @@ public void replaceSegment(ImmutableSegment segment, 
@Nullable ThreadSafeMutable
     }
   }
 
-  @Override
-  protected void removeNewlyAddedKeys(IndexSegment oldSegment) {
-    int removedKeys = 0;
-    for (Map.Entry<Object, RecordLocation> entry : _newlyAddedKeys.entrySet()) 
{
-      if (entry.getValue().getSegment() == oldSegment) {
-        _primaryKeyToRecordLocationMap.remove(entry.getKey());
-        removeDocId(oldSegment, entry.getValue().getDocId());
-        removedKeys++;
-      }
-    }
-    _logger.info("Removed newly added {} keys for the segment: {} out of : 
{}", removedKeys,
-        oldSegment.getSegmentName(), _previousKeyToRecordLocationMap.size());
-  }
-
   @Override
   protected void removeSegment(IndexSegment segment, Iterator<PrimaryKey> 
primaryKeyIterator) {

Review Comment:
   Got it yeah, I simplified and introduced a single method: 
revertAndRemoveSegment in removeSegment so the consuming segment is reverted 
correctly..



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