Apache Solr open-source search software
SOLR-17637: Fix LBHttpSolrClient & HttpShardHandler bug (#3147)
Houston Putmandb0cbd38d512
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 6b9bc8c61ef..a0b03278444 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -182,6 +182,9 @@ Bug Fixescurrent live nodes list is stale. CloudSolrClient now retains the initial configured list of passed URLs as backupused 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.javaindex 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 class LBHttp2SolrClient<C extends HttpSolrClientBase> extends LBSolrClienEndpoint 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.javaindex 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 abstract class LBSolrClient extends SolrClient {}// 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",