Fix the problem that incremental clean cannot be executed when the earliest ActiveTimeline is a pending commit.
- Dominant language
- Java
- Stars
- 6.2k
- Forks
- 2.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 111
Description
When performing a clean, the earliest commit to be retained obtained by the getEarliestCommitToRetain method in CleanPlanner is used as the endpoint of the clean. However, when a pending commit takes a long time and all the commits earlier than the pending commit have been achieved, the pending commit becomes the earliest active timeline. In this situation, if getEarliestCommitToRetain is called, it will return empty because there is no earlier commit than the pending commit. During an incremental clean, the previous endpoint, which is the last commit retained in the previous clean, is used as the starting point. However, if this starting point is empty, a full clean will be triggered, which is very resource-intensive.
To solve this problem without affecting normal clean, I set the EarliestCommitToRetain obtained in this case to the earliest pending commit. Since the endpoint will not be cleaned in the current clean, this approach can solve the aforementioned problem without affecting normal clean.
## JIRA info
- Link: https://issues.apache.org/jira/browse/HUDI-6574
- Type: Bug
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with CleanPlanner and its getEarliestCommitToRetain method, then trace how the previous incremental-clean endpoint is selected when the earliest active timeline is a pending commit. Verify that the pending commit is retained as the endpoint and that incremental clean does not fall back to a full clean, while normal clean behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100