jackjlli commented on a change in pull request #8066: URL: https://github.com/apache/pinot/pull/8066#discussion_r791275075
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/retention/RetentionManager.java ########## @@ -258,10 +257,11 @@ private void manageSegmentLineageCleanupForTable(TableConfig tableConfig) { if (SegmentLineageAccessHelper .writeSegmentLineage(_pinotHelixResourceManager.getPropertyStore(), segmentLineage, expectedVersion)) { // Delete segments based on the segment lineage - _pinotHelixResourceManager.deleteSegments(tableNameWithType, segmentsToDelete); - LOGGER.info("Finished cleaning up segment lineage for table: {}, deleted segments: {} in {}ms", - tableNameWithType, StringUtils.join(segmentsToDelete, ","), - (System.currentTimeMillis() - cleanupStartTime)); + if (!segmentsToDelete.isEmpty()) { + _pinotHelixResourceManager.deleteSegments(tableNameWithType, segmentsToDelete); + LOGGER.info("Finished cleaning up segment lineage for table: {}, deleted segments: {} in {}ms", Review comment: I'd suggest putting the duration before the `segmentToDelete`, as the list of segments to be deleted could be large. -- 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