Jungzhang opened a new pull request, #63566:
URL: https://github.com/apache/doris/pull/63566

   ### What problem does this PR solve?
   
   When a queued split is removed before execution, TimeSharingTaskExecutor 
removed it from the split queue but did not decrement _total_queued_tasks. 
After repeated cancellation/removal, the executor queue size metric and 
capacity accounting could keep growing even with no active workers, causing 
later submissions to fail as if the queue were full.
   
   ### What is changed and how does it work?
   
   - Add helper methods to keep split queue operations and _total_queued_tasks 
updates in one place.
   - Decrement _total_queued_tasks according to the actual number of queued 
splits removed.
   - Reset token state and notify idle waiters when removed queued splits leave 
the executor idle.
   - Cover the regression with a unit test that enqueues splits with no worker 
threads, removes the tasks, and verifies queue size returns to zero before 
accepting a later submission.
   
   ### Check List
   
   - [x] Added regression test
   - [x] Ran clang-format
   - [ ] Ran BE unit test locally. Blocked by missing local 
thirdparty/installed dependencies: protoc and Snappy.
   


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