Repository navigation
branch-4.1: [fix](compaction): avoid decrementing uncounted cumulative compaction threads #66752 - #67662
Merged
yiguolei merged 1 commit intoSep 9, 2026
Conversation
… threads (apache#66752) Backport the cumulative compaction thread-accounting fix and its regression coverage to branch-4.1. (cherry picked from commit d113b43) Signed-off-by: Yukang-Lian <lianyukang@selectdb.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Collaborator
Author
|
run buildall |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
yiguolei
approved these changes
Sep 9, 2026
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
PR approved by at least one committer and no changes requested. |
yiguolei
pushed a commit
that referenced
this pull request
Sep 10, 2026
…e compaction threads #66752 (#67662) ### What problem does this PR solve? Issue Number: None Related PR: #66752 Problem Summary: Backport the cumulative compaction thread-accounting fix from #66752 to `branch-4.1`. When tablet global compaction lock acquisition fails, the worker exits before `_cumu_compaction_thread_pool_used_threads` is incremented. The deferred cleanup previously decremented the counter unconditionally, which could make it negative and distort compaction scheduling capacity. This backport preserves the 4.1 compaction structure and guards cleanup so the counter is decremented only after it has actually been incremented. It also carries the focused C++ regression test and the Cloud fault-injection regression suite from the source fix. Local validation: - `git diff --check` - Clang Format 16 dry-run for the changed C++ files - `clang++ -fsyntax-only` for `cloud_storage_engine.cpp` and `cloud_compaction_test.cpp` using an existing 4.1 ASAN UT compile database - Groovy 4.0.19 parse for `test_cloud_cumu_compaction_global_lock_thread_count.groovy` The focused C++ and Docker regression tests were not executed locally; hosted CI remains required. ### Release note Fix Cloud cumulative compaction thread accounting after global lock acquisition failures. ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Regression test - [x] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> Test cases: - `CloudCompactionTest.cumulative_global_lock_failure_keeps_thread_count_balanced` - `test_cloud_cumu_compaction_global_lock_thread_count` Signed-off-by: Yukang-Lian <lianyukang@selectdb.com> Co-authored-by: dzr171712 <166372158+dzr171712@users.noreply.github.com>
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: #66752
Problem Summary:
Backport the cumulative compaction thread-accounting fix from #66752 to
branch-4.1.When tablet global compaction lock acquisition fails, the worker exits before
_cumu_compaction_thread_pool_used_threadsis incremented. The deferred cleanup previously decremented the counter unconditionally, which could make it negative and distort compaction scheduling capacity.This backport preserves the 4.1 compaction structure and guards cleanup so the counter is decremented only after it has actually been incremented. It also carries the focused C++ regression test and the Cloud fault-injection regression suite from the source fix.
Local validation:
git diff --checkclang++ -fsyntax-onlyforcloud_storage_engine.cppandcloud_compaction_test.cppusing an existing 4.1 ASAN UT compile databasetest_cloud_cumu_compaction_global_lock_thread_count.groovyThe focused C++ and Docker regression tests were not executed locally; hosted CI remains required.
Release note
Fix Cloud cumulative compaction thread accounting after global lock acquisition failures.
Check List (For Author)
Test
Test cases:
CloudCompactionTest.cumulative_global_lock_failure_keeps_thread_count_balancedtest_cloud_cumu_compaction_global_lock_thread_count