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

   https://issues.apache.org/jira/browse/SOLR-18174
   
   Root cause analysis by Claude:
   
   A thread race between two concurrent paths after fakeServer.rstAll():
   - Executor thread: apiFuture is completed (from onHeaders dispatching to 
executor, or from onFailure dispatching
   future.completeExceptionally). allOf(futures).get() waits on this.
   - Jetty IO thread: asyncTracker.completeListener.onComplete() → 
available.release(). This fires after the response
   listeners (onHeaders/onFailure), meaning it can lag behind the executor 
thread.
   
   allOf(futures).get() can return with all futures done while 1 (or more) 
completeListeners on the IO thread haven't had
   a chance to call available.release() yet. The permits ARE eventually 
restored — the test just measured too eagerly.
   
   Fix: After allOf().get(), poll the permit count for up to 5 seconds (in 10ms 
increments) to let the IO thread catch up 
   before asserting. This makes the test robust without modifying any 
production code.
   


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