tibrewalpratik17 commented on code in PR #12037:
URL: https://github.com/apache/pinot/pull/12037#discussion_r1410611896


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManager.java:
##########
@@ -240,6 +243,26 @@ public void doRemoveExpiredPrimaryKeys() {
     persistWatermark(_largestSeenComparisonValue);
   }
 
+  @Override
+  public void doRemoveExpiredDeletedKeys() {
+    double threshold = _largestSeenComparisonValue - _deletedKeysTTL;
+    AtomicInteger numDeletedKeys = new AtomicInteger();
+    _primaryKeyToRecordLocationMap.forEach((primaryKey, recordLocation) -> {

Review Comment:
   Moved to `doRemoveExpiredPrimaryKeys` so we are looping once. Also added 
metrics for tracking duration of this operation and number of keys deleted.



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