javanna commented on PR #13472:
URL: https://github.com/apache/lucene/pull/13472#issuecomment-2173425087

   @shubhamvishu @reta @sohami @mikemccand @zhaih I am pinging you folks 
because you have previously been involved in some of the search concurrency 
discussions and this PR will affect how search concurrency is exposed to users.
   
   Elasticsearch leverages inter-segment search concurrency in Lucene by 
providing an executor to the `IndexSearcher`. Such executor is so far separate 
from the one that calls `IndexSearcher#search`: there is a search thread pool 
as well as a search workers thread pool in Elasticsearch. This introduces some 
complexity for Lucene users, as they need to size a separate executor and 
provide it in order to benefit from search concurrency. We have seen that the 
caller thread is under-utilized and could happily help execute tasks too, while 
it currently blocks and waits for all search tasks to complete. 
@original-brownbear implemented a deadlock free solution to this, that allows 
the caller thread to offload tasks to the executor and at the same time pull 
tasks while they have not yet been executed. This reduces forking and optimizes 
concurreunt execution. Additionally, this makes it possible to execute all of 
the tasks on a single executor, removing the requirements that users size and pr
 ovide a separate executor to the searcher.  I think this is great both from 
the perspective of better resource utilization as well as how easier it gets to 
leverage concurrency in Lucene.
   
   What do you all think?
   


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