This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9_8
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_8 by this push:
new fc1d3e1656a SOLR-17637: Fix LBHttpSolrClient & HttpShardHandler bug
(#3147)
fc1d3e1656a is described below
commit fc1d3e1656afcb08b4a731a4f3db5bd0950a0ce1
Author: Houston Putman <[email protected]>
AuthorDate: Thu Jan 30 13:46:06 2025 -0600
SOLR-17637: Fix LBHttpSolrClient & HttpShardHandler bug (#3147)
This bug causes async requests to be uncompleted in some error scenarios.
The HttpShardHandler can hang indefinitely when this happens.
(cherry picked from commit db0cbd38d512da22e99fbbb0e4f65fc720de5441)
---
solr/CHANGES.txt | 19 ++-----------------
.../solr/client/solrj/impl/LBHttp2SolrClient.java | 2 +-
.../apache/solr/client/solrj/impl/LBSolrClient.java | 4 +++-
3 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 568c3722734..28789e7d138 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -5,30 +5,15 @@ Most people will find the solr-upgrade-notes.adoc file more
approachable.
https://github.com/apache/solr/blob/main/solr/solr-ref-guide/modules/upgrade-notes/pages/solr-upgrade-notes.adoc
================== 9.8.1 ==================
-New Features
----------------------
-(No changes)
-
-Improvements
----------------------
-(No changes)
-
-Optimizations
----------------------
-(No changes)
-
Bug Fixes
---------------------
-(No changes)
+* 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
---------------------
(No changes)
-Other Changes
----------------------
-(No changes)
-
================== 9.8.0 ==================
New Features
---------------------
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 15ee0a229d6..14b869fd41a 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
@@ -236,7 +236,7 @@ public class LBHttp2SolrClient extends LBSolrClient {
String 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 172dfd5ab04..921e41358e3 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
@@ -303,7 +303,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",