This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit a3c387d1c640499140babdaf729e1962fcae4e2a
Author: David Smiley <[email protected]>
AuthorDate: Wed Jun 3 00:25:39 2026 -0400

    HttpJettySolrClient: don't throw IllegalStateException if connection lost 
(#4490)
    
    HttpJettySolrClient could throw IllegalStateException on connection lost,
      which foiled LBSolrClient's attempts to classify a request as retry-able.
    
    (cherry picked from commit 60397085723de228799dd9b6e26910c7d2e5380c)
---
 .../PR#4490-HttpJettySolrClient-IllegalStateException.yml        | 9 +++++++++
 .../java/org/apache/solr/client/solrj/impl/Http2SolrClient.java  | 4 ++++
 2 files changed, 13 insertions(+)

diff --git 
a/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml 
b/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml
new file mode 100644
index 00000000000..cf5b8961c98
--- /dev/null
+++ b/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml
@@ -0,0 +1,9 @@
+title: >
+  HttpJettySolrClient could throw IllegalStateException on connection lost,
+  which foiled LBSolrClient's attempts to classify a request as retry-able.
+type: fixed
+authors:
+  - name: David Smiley
+links:
+  - name: PR#4490
+    url: https://github.com/apache/solr/pull/4490
diff --git 
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java 
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
index b995edc664d..ad014b6a0e0 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
@@ -640,6 +640,10 @@ public class Http2SolrClient extends HttpSolrClientBase {
             "IOException occurred when talking to server at: " + url, cause);
       }
       throw new SolrServerException(cause.getMessage(), cause);
+    } catch (IllegalStateException e) {
+      // Jetty HTTP/2 throws IllegalStateException ("session closed") when the 
connection is lost.
+      abortCause = e;
+      throw new SolrServerException("Connection lost at: " + url, new 
IOException(e));
     } catch (SolrServerException | RuntimeException sse) {
       abortCause = sse;
       throw sse;

Reply via email to