You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/06/20 08:28:50 UTC

[GitHub] [hudi] yuzhaojing commented on a change in pull request #3105: [HUDI-2038] Rollback pending compaction when schedule new compaction

yuzhaojing commented on a change in pull request #3105:
URL: https://github.com/apache/hudi/pull/3105#discussion_r654898311



##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/table/action/compact/FlinkScheduleCompactionActionExecutor.java
##########
@@ -72,6 +75,17 @@ protected HoodieCompactionPlan scheduleCompaction() {
     boolean compactable = needCompact(config.getInlineCompactTriggerStrategy());
     if (compactable) {
       LOG.info("Generating compaction plan for merge on read table " + config.getBasePath());
+      // roll back the inflight compaction first
+      HoodieTimeline pendingCompactionTimeline = table.getActiveTimeline().filterPendingCompactionTimeline();

Review comment:
       In flink compaction, if a merge fails during execution, our program will simply ignore it and this compaction won't end.
   So we need to rollback the pending compaction when the scheduling the new compaction.




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

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