From 9ecf9ef5a673ff834c7806dd284ce3c4bb3d0e6a Mon Sep 17 00:00:00 2001 From: David Smiley Date: Sun, 31 May 2026 21:44:31 -0400 Subject: [PATCH 1/3] HttpJettySolrClient: use better exception Fix ensures that LBSolrClient treats it as a retryable connection failure. --- .../apache/solr/client/solrj/jetty/HttpJettySolrClient.java | 4 ++++ 1 file changed, 4 insertions(+) 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 fdd5fa8443b9..46f0a23aec67 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 NamedList request(SolrRequest solrRequest, String collection) "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; From 3cc013258ace1b683ce968333285093f5e852113 Mon Sep 17 00:00:00 2001 From: David Smiley Date: Mon, 1 Jun 2026 00:03:36 -0400 Subject: [PATCH 2/3] changelog --- ...pJettySolrClient-IllegalStateException.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml diff --git a/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml b/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml new file mode 100644 index 000000000000..ff86548dcde6 --- /dev/null +++ b/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml @@ -0,0 +1,33 @@ +# (DELETE ALL COMMENTS UP HERE AFTER FILLING THIS IN + +# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc + +# If the change is minor, don't bother adding a changelog entry. +# For `other` type entries, the threshold to bother with a changelog entry should be even higher. + +# title: +# * The audience is end-users and administrators, not committers. +# * Be short and focused on the user impact. Multiple sentences is fine! +# * For technical/geeky details, prefer the commit message instead of changelog. +# * Reference JIRA issues like `SOLR-12345`, or if no JIRA but have a GitHub PR then `PR#12345`. + +# type: +# `added` for new features/improvements, opt-in by the user typically documented in the ref guide +# `changed` for improvements; not opt-in +# `fixed` for improvements that are deemed to have fixed buggy behavior +# `deprecated` for marking things deprecated +# `removed` for code removed +# `dependency_update` for updates to dependencies +# `other` for anything else, like large/significant refactorings, build changes, +# test infrastructure, or documentation. +# Most such changes are too small/minor to bother with a changelog entry. + +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 From 045c5c50fc9244162ffe6288294d56e3e52fe422 Mon Sep 17 00:00:00 2001 From: David Smiley Date: Mon, 1 Jun 2026 00:04:28 -0400 Subject: [PATCH 3/3] changelog --- ...pJettySolrClient-IllegalStateException.yml | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml b/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml index ff86548dcde6..cf5b8961c987 100644 --- a/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml +++ b/changelog/unreleased/PR#4490-HttpJettySolrClient-IllegalStateException.yml @@ -1,27 +1,3 @@ -# (DELETE ALL COMMENTS UP HERE AFTER FILLING THIS IN - -# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc - -# If the change is minor, don't bother adding a changelog entry. -# For `other` type entries, the threshold to bother with a changelog entry should be even higher. - -# title: -# * The audience is end-users and administrators, not committers. -# * Be short and focused on the user impact. Multiple sentences is fine! -# * For technical/geeky details, prefer the commit message instead of changelog. -# * Reference JIRA issues like `SOLR-12345`, or if no JIRA but have a GitHub PR then `PR#12345`. - -# type: -# `added` for new features/improvements, opt-in by the user typically documented in the ref guide -# `changed` for improvements; not opt-in -# `fixed` for improvements that are deemed to have fixed buggy behavior -# `deprecated` for marking things deprecated -# `removed` for code removed -# `dependency_update` for updates to dependencies -# `other` for anything else, like large/significant refactorings, build changes, -# test infrastructure, or documentation. -# Most such changes are too small/minor to bother with a changelog entry. - title: > HttpJettySolrClient could throw IllegalStateException on connection lost, which foiled LBSolrClient's attempts to classify a request as retry-able.