diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 6b9bc8c61ef..a0b03278444 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -182,6 +182,9 @@ Bug Fixes current live nodes list is stale. CloudSolrClient now retains the initial configured list of passed URLs as backup used for fetching cluster state when all live nodes have failed. (Matthew Biscocho via David Smiley, Houston Putman) +* SOLR-17637: LBHttp2SolrClient can fail to complete async requests in certain error scenarios. + This can cause the HttpShardHandler to indefinitely wait on a completed response that will never come. (Houston Putman) + Dependency Upgrades --------------------- * SOLR-17471: Upgrade Lucene to 9.12.1. (Pierre Salagnac, Christine Poerschke) diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java index 2c926a26261..059e2592f77 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java @@ -156,7 +156,7 @@ public void onFailure(Exception e, boolean retryReq) { Endpoint url; try { url = it.nextOrError(e); - } catch (SolrServerException ex) { + } catch (Throwable ex) { apiFuture.completeExceptionally(e); return; } diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java index 64201b03c13..67f5e489ac8 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java @@ -315,7 +315,9 @@ public synchronized Endpoint nextOrError(Exception previousEx) throws SolrServer } // Skipping check time exceeded for the first request // Ugly string based hack but no live servers message here is VERY misleading :( - if ((previousEx != null && previousEx.getMessage().contains("Limits exceeded!")) + if ((previousEx != null + && previousEx.getMessage() != null + && previousEx.getMessage().contains("Limits exceeded!")) || (numServersTried > 0 && isTimeExceeded(timeAllowedNano, timeOutTime))) { throw new SolrServerException( "The processing limits for to this request were exceeded, see cause for details",