Repository navigation
[fix](compaction) Count empty rowsets in approximate compaction score - #66610
Merged
Yukang-Lian merged 1 commit intoAug 11, 2026
Merged
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
Cloud cumulative compaction scheduling updates an approximate score before rowset metadata is synchronized. Zero-segment rowsets previously added zero to this score, although synchronized metadata counts each empty rowset as one. As a result, empty rowsets could accumulate without raising tablet scheduling priority.
Count every zero-segment load and delete rowset as one while preserving the existing segment-based estimate for non-empty PREPARED rowsets.
### Release note
Fix cloud cumulative compaction scheduling for empty rowsets.
### Check List (For Author)
- Test
- [x] Unit Test
- Behavior changed:
- [x] Yes. Zero-segment rowsets now add one to the approximate cumulative compaction score.
- Does this need documentation?
- [x] No.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Yukang-Lian
marked this pull request as ready for review
August 10, 2026 08:44
Collaborator
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29315 ms |
Contributor
TPC-DS: Total hot run time: 158398 ms |
Contributor
ClickBench: Total hot run time: 24 s |
luwei16
approved these changes
Aug 11, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
gavinchou
approved these changes
Aug 11, 2026
Contributor
|
skip check_coverage |
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 11, 2026
…#66610) Problem Summary: Cloud cumulative compaction scheduling maintains an approximate score between metadata synchronizations. The online write path used the raw segment count, so a zero-segment rowset added no score even though metadata synchronization counts every empty rowset as one. Empty rowsets could therefore accumulate without increasing tablet scheduling priority. This PR clamps the online contribution of a load rowset to at least one and adds the same contribution for zero-segment delete-predicate rowsets, which bypass `CloudRowsetBuilder`. Non-empty PREPARED rowsets keep the existing segment-based estimate because their versions have not been assigned yet. The unit test models that PREPARED, versionless lifecycle and verifies both cases: a zero-segment rowset contributes one, while a three-segment rowset still contributes three. ### Release note Fix cloud cumulative compaction scheduling for empty rowsets.
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 11, 2026
…#66610) Problem Summary: Cloud cumulative compaction scheduling maintains an approximate score between metadata synchronizations. The online write path used the raw segment count, so a zero-segment rowset added no score even though metadata synchronization counts every empty rowset as one. Empty rowsets could therefore accumulate without increasing tablet scheduling priority. This PR clamps the online contribution of a load rowset to at least one and adds the same contribution for zero-segment delete-predicate rowsets, which bypass `CloudRowsetBuilder`. Non-empty PREPARED rowsets keep the existing segment-based estimate because their versions have not been assigned yet. The unit test models that PREPARED, versionless lifecycle and verifies both cases: a zero-segment rowset contributes one, while a three-segment rowset still contributes three. ### Release note Fix cloud cumulative compaction scheduling for empty rowsets.
wyxxxcat
pushed a commit
to wyxxxcat/doris
that referenced
this pull request
Aug 17, 2026
…apache#66610) Problem Summary: Cloud cumulative compaction scheduling maintains an approximate score between metadata synchronizations. The online write path used the raw segment count, so a zero-segment rowset added no score even though metadata synchronization counts every empty rowset as one. Empty rowsets could therefore accumulate without increasing tablet scheduling priority. This PR clamps the online contribution of a load rowset to at least one and adds the same contribution for zero-segment delete-predicate rowsets, which bypass `CloudRowsetBuilder`. Non-empty PREPARED rowsets keep the existing segment-based estimate because their versions have not been assigned yet. The unit test models that PREPARED, versionless lifecycle and verifies both cases: a zero-segment rowset contributes one, while a three-segment rowset still contributes three. ### Release note Fix cloud cumulative compaction scheduling for empty rowsets.
morrySnow
pushed a commit
that referenced
this pull request
Aug 31, 2026
…#66610) Problem Summary: Cloud cumulative compaction scheduling maintains an approximate score between metadata synchronizations. The online write path used the raw segment count, so a zero-segment rowset added no score even though metadata synchronization counts every empty rowset as one. Empty rowsets could therefore accumulate without increasing tablet scheduling priority. This PR clamps the online contribution of a load rowset to at least one and adds the same contribution for zero-segment delete-predicate rowsets, which bypass `CloudRowsetBuilder`. Non-empty PREPARED rowsets keep the existing segment-based estimate because their versions have not been assigned yet. The unit test models that PREPARED, versionless lifecycle and verifies both cases: a zero-segment rowset contributes one, while a three-segment rowset still contributes three. ### Release note Fix cloud cumulative compaction scheduling for empty rowsets.
morrySnow
pushed a commit
that referenced
this pull request
Aug 31, 2026
…#66610) Problem Summary: Cloud cumulative compaction scheduling maintains an approximate score between metadata synchronizations. The online write path used the raw segment count, so a zero-segment rowset added no score even though metadata synchronization counts every empty rowset as one. Empty rowsets could therefore accumulate without increasing tablet scheduling priority. This PR clamps the online contribution of a load rowset to at least one and adds the same contribution for zero-segment delete-predicate rowsets, which bypass `CloudRowsetBuilder`. Non-empty PREPARED rowsets keep the existing segment-based estimate because their versions have not been assigned yet. The unit test models that PREPARED, versionless lifecycle and verifies both cases: a zero-segment rowset contributes one, while a three-segment rowset still contributes three. ### Release note Fix cloud cumulative compaction scheduling for empty rowsets.
Closed
1 of 4 tasks
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.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
Cloud cumulative compaction scheduling maintains an approximate score between metadata synchronizations. The online write path used the raw segment count, so a zero-segment rowset added no score even though metadata synchronization counts every empty rowset as one. Empty rowsets could therefore accumulate without increasing tablet scheduling priority.
This PR clamps the online contribution of a load rowset to at least one and adds the same contribution for zero-segment delete-predicate rowsets, which bypass
CloudRowsetBuilder. Non-empty PREPARED rowsets keep the existing segment-based estimate because their versions have not been assigned yet.The unit test models that PREPARED, versionless lifecycle and verifies both cases: a zero-segment rowset contributes one, while a three-segment rowset still contributes three.
Release note
Fix cloud cumulative compaction scheduling for empty rowsets.
Check List (For Author)
Test
./run-be-ut.sh --run --filter='CloudCompactionTest.*' -j80(18 tests passed)build-support/check-format.shgit diff --checkBehavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)