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.
  • Loading branch information
HoustonPutman authored Jan 30, 2025
1 parent 436e7f8 commit db0cbd3
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 @@ -182,6 +182,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 @@ -156,7 +156,7 @@ public void onFailure(Exception e, boolean retryReq) {
Endpoint 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 @@ -315,7 +315,9 @@ public synchronized Endpoint nextOrError(Exception previousEx) throws SolrServer
}
// 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 db0cbd3

Please sign in to comment.