[fix](compaction): avoid decrementing uncounted cumulative compaction threads - #66752
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run p0 |
|
run performance |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run performance |
1 similar comment
|
run performance |
|
run buildall |
TPC-H: Total hot run time: 17159 ms |
TPC-DS: Total hot run time: 80398 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run cloud_p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run cloud_p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run cloud_p0 |
|
run buildall |
TPC-H: Total hot run time: 17217 ms |
TPC-DS: Total hot run time: 83950 ms |
ClickBench: Total hot run time: 14.5 s |
|
run beut |
|
run beut |
4 similar comments
|
run beut |
|
run beut |
|
run beut |
|
run beut |
|
run but |
|
run beut |
|
run buildall |
TPC-H: Total hot run time: 16808 ms |
TPC-DS: Total hot run time: 81707 ms |
ClickBench: Total hot run time: 14.62 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run cloud_p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 16896 ms |
TPC-DS: Total hot run time: 82616 ms |
ClickBench: Total hot run time: 14.8 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
Issue Number: close #xxx
Related PR: None
Problem Summary:
In Cloud mode, cumulative compaction requests the tablet global compaction
lock before increasing
_cumu_compaction_thread_pool_used_threads.The cleanup
Deferis created before the lock request. If the global lockrequest fails, the task returns before the thread counter is incremented, but
the cleanup logic still decrements the counter. As a result,
_cumu_compaction_thread_pool_used_threadscan become negative.A negative thread counter can cause the cumulative compaction scheduling logic
to calculate the remaining thread capacity incorrectly and affect the
large-task delay decision.
This PR adds a guard to ensure that the thread counter is decremented only
when it has actually been incremented.
A regression unit test is added to simulate global compaction lock failure and
verify that the counter remains balanced.
Release note
None
Check List (For Author)
Test
Test case: