Yukang-Lian opened a new pull request, #67662:
URL: https://github.com/apache/doris/pull/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`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]