linliu-code commented on code in PR #11972:
URL: https://github.com/apache/hudi/pull/11972#discussion_r1767706053


##########
hudi-common/src/main/java/org/apache/hudi/common/util/CleanerUtils.java:
##########
@@ -85,8 +85,9 @@ public static HoodieCleanMetadata convertCleanMetadata(String 
startCleanTime,
         partitionBootstrapMetadataMap.put(stat.getPartitionPath(), 
bootstrapMetadata);
       }
       totalDeleted += stat.getSuccessDeleteFiles().size();
-      if (earliestCommitToRetain == null) {
-        // This will be the same for all partitions
+
+      // Use the largest completion time.
+      if (needUpdate(stat.getEarliestCommitToRetain(), 
earliestCommitToRetain)) {
         earliestCommitToRetain = stat.getEarliestCommitToRetain();
         lastCompletedCommitTimestamp = stat.getLastCompletedCommitTimestamp();

Review Comment:
   Should we use `stat.getLastCompletedCommitTimestamp()` for both variables?



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

Reply via email to