mirror of https://github.com/apache/lucene.git
SOLR-8701: CloudSolrClient decides that there are no healthy nodes to handle a request too early.
This commit is contained in:
parent
6ccb43a7b7
commit
c4d31798cc
|
@ -179,6 +179,9 @@ Bug Fixes
|
||||||
* SOLR-8416: The collections create API should return after all replicas are active.
|
* SOLR-8416: The collections create API should return after all replicas are active.
|
||||||
(Michael Sun, Mark Miller, Alexey Serba)
|
(Michael Sun, Mark Miller, Alexey Serba)
|
||||||
|
|
||||||
|
* SOLR-8701: CloudSolrClient decides that there are no healthy nodes to handle a request too early.
|
||||||
|
(Mark Miller)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
* SOLR-7876: Speed up queries and operations that use many terms when timeAllowed has not been
|
* SOLR-7876: Speed up queries and operations that use many terms when timeAllowed has not been
|
||||||
|
|
|
@ -1077,12 +1077,6 @@ public class CloudSolrClient extends SolrClient {
|
||||||
theUrlList = new ArrayList<>(urlList.size());
|
theUrlList = new ArrayList<>(urlList.size());
|
||||||
theUrlList.addAll(urlList);
|
theUrlList.addAll(urlList);
|
||||||
}
|
}
|
||||||
if(theUrlList.isEmpty()) {
|
|
||||||
for (String s : collectionNames) {
|
|
||||||
if(s!=null) collectionStateCache.remove(s);
|
|
||||||
}
|
|
||||||
throw new SolrException(SolrException.ErrorCode.INVALID_STATE, "Could not find a healthy node to handle the request.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Collections.shuffle(theUrlList, rand);
|
Collections.shuffle(theUrlList, rand);
|
||||||
if (sendToLeaders) {
|
if (sendToLeaders) {
|
||||||
|
@ -1093,6 +1087,13 @@ public class CloudSolrClient extends SolrClient {
|
||||||
theUrlList.addAll(theReplicas);
|
theUrlList.addAll(theReplicas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (theUrlList.isEmpty()) {
|
||||||
|
for (String s : collectionNames) {
|
||||||
|
if (s != null) collectionStateCache.remove(s);
|
||||||
|
}
|
||||||
|
throw new SolrException(SolrException.ErrorCode.INVALID_STATE,
|
||||||
|
"Could not find a healthy node to handle the request.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LBHttpSolrClient.Req req = new LBHttpSolrClient.Req(request, theUrlList);
|
LBHttpSolrClient.Req req = new LBHttpSolrClient.Req(request, theUrlList);
|
||||||
|
|
Loading…
Reference in New Issue