You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hbgstc123 (via GitHub)" <gi...@apache.org> on 2023/04/25 10:03:00 UTC

[GitHub] [hudi] hbgstc123 commented on a diff in pull request #8506: [HUDI-6104] Clean deleted partition with clean policy

hbgstc123 commented on code in PR #8506:
URL: https://github.com/apache/hudi/pull/8506#discussion_r1176294322


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -367,10 +367,12 @@ private Pair<Boolean, List<CleanFileInfo>> getFilesToCleanKeepingLatestCommits(S
           }
         }
       }
+      boolean noReplacedFileAfterOrOnEarliestRetainInstant =
+              !fileSystemView.getReplacedFileGroupsAfterOrOn(earliestCommitToRetain.getTimestamp(), partitionPath).findAny().isPresent();
       // if there are no valid file groups

Review Comment:
   when the replace commit is considered ready to be clean;
   For example, if clean policy is `KEEP_LATEST_BY_HOURS` and `clean.retain_hours=48`, then partition dir can be removed 48 hours after dropping partition.



-- 
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-unsubscribe@hudi.apache.org

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