You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2025/05/09 01:49:47 UTC
Re: [PR] [HUDI-9330] Avoid storing the clean plan in inflight clean instant [hudi]
danny0405 commented on code in PR #13192:
URL: https://github.com/apache/hudi/pull/13192#discussion_r2080750488
##########
hudi-common/src/main/java/org/apache/hudi/common/util/CleanerUtils.java:
##########
@@ -168,10 +168,18 @@ public static Option<HoodieInstant> getEarliestCommitToRetain(
public static HoodieCleanerPlan getCleanerPlan(HoodieTableMetaClient metaClient, HoodieInstant cleanInstant)
throws IOException {
CleanPlanMigrator cleanPlanMigrator = new CleanPlanMigrator(metaClient);
+ cleanInstant = getCleanRequestInstant(metaClient, cleanInstant);
HoodieCleanerPlan cleanerPlan = metaClient.getActiveTimeline().readCleanerPlan(cleanInstant);
return cleanPlanMigrator.upgradeToLatest(cleanerPlan, cleanerPlan.getVersion());
}
+ public static HoodieInstant getCleanRequestInstant(HoodieTableMetaClient metaClient, HoodieInstant cleanInstant) {
+ if (cleanInstant.isInflight() || cleanInstant.isCompleted()) {
Review Comment:
we can check if it is not `REQUESTED` instead.
--
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