Skip to content

Commit

Permalink
SOLR-17637: Fix LBHttpSolrClient & HttpShardHandler bug (#3147)
Browse files Browse the repository at this point in the history
This bug causes async requests to be uncompleted in some error scenarios.
The HttpShardHandler can hang indefinitely when this happens.

(cherry picked from commit db0cbd3)
  • Loading branch information
HoustonPutman committed Jan 30, 2025
1 parent 56dde3c commit 973ef46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Bug Fixes
current live nodes list is stale. CloudSolrClient now retains the initial configured list of passed URLs as backup
used 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public void onFailure(Exception e, boolean retryReq) {
String url;
try {
url = it.nextOrError(e);
} catch (SolrServerException ex) {
} catch (Throwable ex) {
apiFuture.completeExceptionally(e);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ public synchronized String nextOrError(Exception previousEx) throws SolrServerEx
}
// 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",
Expand Down

0 comments on commit 973ef46

Please sign in to comment.