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

   ### What problem does this PR solve?
   
   ThreadPool::do_submit could return a non-OK status after retaining the 
submitted runnable in the token queue. This happened in the cold-start path 
when the task was queued first and lazy creation of the first worker failed. 
The caller would observe submit failure, but the task could still be retained 
and run later if another submit created a worker.
       
   This change creates the first worker before queueing the submitted task. If 
first-worker creation fails, do_submit returns the error without retaining the 
runnable. Later worker-creation failures are unchanged because existing workers 
can still drain queued tasks.


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