github-actions[bot] commented on code in PR #65373:
URL: https://github.com/apache/doris/pull/65373#discussion_r3569074971


##########
be/src/cloud/cloud_storage_engine.cpp:
##########
@@ -1051,6 +1054,9 @@ Status 
CloudStorageEngine::_submit_cumulative_compaction_task(const CloudTabletS
                     
duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
             
CompactionTaskTracker::instance()->update_to_running(compaction_id, rs);
         }
+        bool should_delay_large_task = false;
+        int delayed_used_threads = 0;
+        int delayed_small_tasks_running = 0;

Review Comment:
   The global-lock failure path still unbalances the cumulative delay counters. 
The worker's cleanup `Defer` is installed before 
`_request_tablet_global_compaction_lock()`, but this is the first increment of 
`_cumu_compaction_thread_pool_used_threads`; if the lock request returns 
`JOB_TABLET_BUSY`/stale-cache/schema-change and the worker exits above, the 
defer still decrements the signed counter without a matching increment. Later 
`_should_delay_large_task()` treats that negative value as extra free capacity 
when deciding whether to delay large cumulative tasks. Please only decrement 
after the accounting increment actually happened, or move the increment so 
every path covered by the defer has a matching decrement.



-- 
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]

Reply via email to