original-brownbear commented on PR #13472:
URL: https://github.com/apache/lucene/pull/13472#issuecomment-2155894536

   > The idea behind this other PR was that you would have a worker executor 
that would do almost all the work, and a coordination executor that would be 
mostly coordinating work in the worker threadpool.
   
   But that's not what is happening practically right now? Whether I run N-1 
tasks on the worker pool and one on the caller or N tasks on the worker and 
sleep on the caller thread, either way the coordinator thread is blocked and 
not coordinating anything in the meantime?
   I can see the argument of using the worker pool to limit task concurrency to 
x number of threads/cores. But I wonder since we are blocking the coordinating 
executors threads, leaving them idle, maybe there isn't that much coordinator 
work to do in the first place and both coordinator and worker pool can just be 
the same threads practically? If any of the tasks enqueued from the 
coordinating executor fans out again (and they do), that's how it works anyways.
   
   > Your suggestion is how it used to work before:
   
   Not quite I think: The difference is that in my approach the coordinator 
thread keeps pulling stuff off of the queue in a loop, instead of just doing 
the last task. This means that the coordinating thread will not be "wasted" as 
much if the worker pool takes time to execute the tasks and can't do them all 
in parallel.
   Also, it resolves the dead-lock issue for single threaded or otherwise 
saturated executors.


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to