You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2026/06/25 02:58:37 UTC

Re: [I] Fixed the issue that compaction is invalid when the last commit action is replace commit. [hudi]

nsivabalan commented on issue #15439:
URL: https://github.com/apache/hudi/issues/15439#issuecomment-4795424906

   Looks like this was fixed on master by [HUDI-7532](https://issues.apache.org/jira/browse/HUDI-7532) ([#10915](https://github.com/apache/hudi/pull/10915), commit `cc64cd827475`, May 2024).
   
   The root cause was that `HoodieDefaultTimeline.getCommitTimeline()` returned both `COMMIT_ACTION` and `REPLACE_COMMIT_ACTION` instants. `CompactionUtils.getDeltaCommitsSinceLatestCompaction` used `getCommitTimeline().filterCompletedInstants().lastInstant()` to find the last compaction, so when the last action was a replacecommit (clustering / insert_overwrite), it was treated as the previous compaction — delta commits since the *real* last compaction were filtered out and inline compaction was never scheduled.
   
   The fix split the method:
   - `getCommitTimeline()` → `COMMIT_ACTION` only (which is what compaction emits for MOR)
   - `getCommitAndReplaceTimeline()` → `COMMIT_ACTION` + `REPLACE_COMMIT_ACTION` (+ `CLUSTERING_ACTION` after HUDI-7905)
   
   Verified in current master at `hudi-common/src/main/java/org/apache/hudi/common/table/timeline/BaseHoodieTimeline.java:387` and `hudi-common/src/main/java/org/apache/hudi/common/util/CompactionUtils.java:318`. Closing as fixed — please reopen if you can reproduce on a recent release.


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