Skip to content

branch-4.1: [fix](cloud) Exclude covered rowsets from compaction minimum timestamps #67617 - #67751

Merged
yiguolei merged 1 commit into
branch-4.1from
auto-pick-67617-branch-4.1
Sep 10, 2026
Merged

branch-4.1: [fix](cloud) Exclude covered rowsets from compaction minimum timestamps #67617#67751
yiguolei merged 1 commit into
branch-4.1from
auto-pick-67617-branch-4.1

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked from #67617

…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.
@github-actions
github-actions Bot requested a review from yiguolei as a code owner September 9, 2026 17:31
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@yiguolei
yiguolei merged commit 03b6cc3 into branch-4.1 Sep 10, 2026
39 of 41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor Author

PR approved by anyone and no changes requested.

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

PR approved by at least one committer and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants