[server] add lake-aware partition drop when auto-partition retention is enabled - #3820
Open
zuston wants to merge 11 commits into
Open
[server] add lake-aware partition drop when auto-partition retention is enabled#3820zuston wants to merge 11 commits into
zuston wants to merge 11 commits into
Conversation
added 2 commits
August 6, 2026 11:56
Contributor
|
Thanks for the pr. I promise I'll have a look |
zuston
marked this pull request as ready for review
August 6, 2026 06:45
Member
Author
thanks for your attention! @luoyuxia One concern is that the drop-state transition is currently driven by the external I do not yet have a good way to handle this without adding a built-in driver—possibly a scheduled executor or thread pool—inside |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Auto-partition retention currently drops expired partitions immediately. For lake-enabled tables, lake tiering may still be catching up, which can cause the latest records to be deleted before they are committed to the lake.
Brief change log
This PR introduces an opt-in
table.auto-partition.drop.ensure-tieredoption. When enabled:And for the following corner cases, this PR also has well design
Coordinator failover: All in-memory partition-drop states are lost. Any expired partition that was being frozen, waiting for lake tiering, or ready to be dropped will be rediscovered by
AutoPartitionManagerand restarted fromFREEZING. Because freezing is monotonic and idempotent, the new Coordinator can safely recapture the frozen offsets, repeat the lake-tiering check, and eventually drop the partition.Bucket leader failover: Before a follower is promoted to leader, it reads the current
PartitionRegistrationfrom ZooKeeper. If the partition is marked asfrozen, the new leader restores the write fence before accepting writes. Therefore, a leader change cannot reopen the partition for writes, and the drop workflow can continue safely.Tests
API and Format
Documentation