This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 60397085723 HttpJettySolrClient: don't throw IllegalStateException if
connection lost (#4490)
60397085723 is described below
commit 60397085723de228799dd9b6e26910c7d2e5380c
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.
---
.../PR#4490-HttpJettySolrClient-IllegalStateException.yml | 9 +++++++++
.../org/apache/solr/client/solrj/jetty/HttpJettySolrClient.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-jetty/src/java/org/apache/solr/client/solrj/jetty/HttpJettySolrClient.java
b/solr/solrj-jetty/src/java/org/apache/solr/client/solrj/jetty/HttpJettySolrClient.java
index fdd5fa8443b..46f0a23aec6 100644
---
a/solr/solrj-jetty/src/java/org/apache/solr/client/solrj/jetty/HttpJettySolrClient.java
+++
b/solr/solrj-jetty/src/java/org/apache/solr/client/solrj/jetty/HttpJettySolrClient.java
@@ -507,6 +507,10 @@ public class HttpJettySolrClient extends HttpSolrClient {
"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;