branch-4.1: [fix](cloud) Exclude covered rowsets from compaction minimum timestamps #67617 - #67751
Merged
Merged
Conversation
…ps (#67617) Problem Summary: Versioned rowset reads add load metadata versions to the reader minimum before compact rowsets remove covered loads from the returned set. With loads L2[2,2]@80 and L3[3,3]@90 covered by A[2,3]@150, plus L4[4,4]@170, reading [2,4] returns A and L4 but records a minimum of 80. Later compaction logs can consequently retain successive compacted rowsets for a snapshot that only needs L2/L3. Keep each candidate's metadata Versionstamp alongside its rowset, then merge only the final returned candidates into the existing minimum after both scans succeed. The returned set, scan/coverage rules, snapshot bounds and error propagation are unchanged. Previous stats and other real dependencies remain tracked, and persisted historical logs are unchanged. The regression exercises two real MetaService compactions and the Recycler reference checker using MemTxnKv: snapshot@100 still protects the first log containing L2/L3, while the later log has min_timestamp=150 and is no longer protected by that snapshot. ### Release note Fix unnecessary retention of later compacted rowsets when snapshots protect older load rowsets already covered by compaction.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
yiguolei
approved these changes
Sep 10, 2026
Contributor
Author
|
PR approved by anyone and no changes requested. |
Contributor
Author
|
PR approved by at least one committer and no changes requested. |
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.
Cherry-picked from #67617