walterddr commented on a change in pull request #8078:
URL: https://github.com/apache/pinot/pull/8078#discussion_r798940492



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/retention/RetentionManager.java
##########
@@ -93,12 +93,20 @@ protected void processTable(String tableNameWithType) {
 
     // Delete segments based on segment lineage and clean up segment lineage 
metadata.
     manageSegmentLineageCleanupForTable(tableConfig);
+
+    // call segment deletion manager for that table
+    
_pinotHelixResourceManager.getSegmentDeletionManager().removeAgedDeletedSegments(tableConfig);
   }
 
   @Override
   protected void postprocess() {
-    LOGGER.info("Removing aged (more than {} days) deleted segments for all 
tables", _deletedSegmentsRetentionInDays);
-    
_pinotHelixResourceManager.getSegmentDeletionManager().removeAgedDeletedSegments(_deletedSegmentsRetentionInDays);
+    LOGGER.info("Clean up aged (more than {} days) deleted segments for all 
tables", _deletedSegmentsRetentionInDays);
+    List<String> tableWithAgedDeletedSegments =
+        
_pinotHelixResourceManager.getSegmentDeletionManager().getTableWithAgedDeletedSegments();
+    for (String tableName : tableWithAgedDeletedSegments) {
+      TableConfig tableConfig = 
_pinotHelixResourceManager.getTableConfig(tableName);

Review comment:
       make this call parsing and only pass in the retentionMs to 
SegmentDeletionManager.




-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to