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
|
@ -178,7 +178,10 @@ Bug Fixes
|
|||
|
||||
* SOLR-8416: The collections create API should return after all replicas are active.
|
||||
(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
|
||||
----------------------
|
||||
* 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.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);
|
||||
if (sendToLeaders) {
|
||||
|
@ -1093,6 +1087,13 @@ public class CloudSolrClient extends SolrClient {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue