janhoy commented on code in PR #4236:
URL: https://github.com/apache/solr/pull/4236#discussion_r3090028689
##########
solr/solrj-jetty/src/java/org/apache/solr/client/solrj/jetty/HttpJettySolrClient.java:
##########
@@ -454,12 +444,14 @@ public void onHeaders(Response response) {
@Override
public void onFailure(Response response, Throwable failure) {
super.onFailure(response, failure);
- // Dispatch off the IO thread so any whenComplete retry won't
block on
- // semaphore.acquire().
- failureDispatchExecutor.execute(
- () ->
- future.completeExceptionally(
- new SolrServerException(failure.getMessage(),
failure)));
+ // Dispatch off the IO thread to avoid blocking
semaphore.acquire() on retry.
+ // Fall back to IO thread if executor rejects
(shutdown/overloaded).
+ SolrServerException ex = new
SolrServerException(failure.getMessage(), failure);
+ try {
+ executor.execute(() -> future.completeExceptionally(ex));
+ } catch (RejectedExecutionException ree) {
+ future.completeExceptionally(ex);
Review Comment:
Done
--
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]