janhoy commented on PR #4236:
URL: https://github.com/apache/solr/pull/4236#issuecomment-4130477206

   > I guess this is only tangentially related, but there has to be a simpler 
way of doing all of this, right? This class is just hideously complex and 
tracing a single request is almost impossible with the number of 
CompletableFutures, and async method rabbit holes. Could this possibly be 
re-architected to be much simpler? Can we use utilities that Jetty gives us? 
I'm not saying the answer is yes, but I really think we ought to look into it, 
because this is a constant cause of bugs and headaches, and we are really just 
doing async requests using a library...
   
   Yea, agree that taking a step back and re-think is the right long term 
answer here. In 10.x we're on Java21 so we can use virtual threads now. I.e. 
replace CompletableFuture+Semaphore with plain blocking request() calls 
dispatched on Java virtual threads — one per shard. Simpler and cheap... But 
this is getting off topic. Someone should start a dev-list discussion and/or a 
SIP about such a redesign.
   
   But for fixing this in 9.x line, which will stil have a long life, we need 
to struggle with what we have, and at the least make semaphore max 
configurable, but probably other fixes as well.


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