markrmiller opened a new pull request, #3843:
URL: https://github.com/apache/solr/pull/3843

   ParallelHttpShardHandler incorrectly composes FutureTask with 
CompletableFuture, resulting in lost exceptions and hanging distributed 
requests.
   
    
   During shard submission, ParallelHttpShardHandler wraps each 
makeShardRequest invocation inside a FutureTask, and then runs that task via 
CompletableFuture.runAsync. The intent is to submit shard requests 
asynchronously and record their completion or failure using a whenComplete 
handler.
   
   However, FutureTask.run() captures exceptions internally rather than 
throwing them. When it’s executed inside CompletableFuture.runAsync, the 
enclosing CompletableFuture cannot detect that a failure occurred, because 
runAsync only completes exceptionally when the submitted Runnable throws.
   
   As a result, if super.makeShardRequest(...) throws an exception:
   
   The FutureTask records the exception internally.
   The CompletableFuture completes successfully (no exception propagated).
   The whenComplete callback receives a null Throwable, so the error handler 
(recordShardSubmitError) is never called.
   The shard response is never recorded.
   The coordinating request waits indefinitely for a shard response that will 
never arrive.


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