You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by an...@apache.org on 2016/04/20 00:34:19 UTC
[3/3] lucene-solr:branch_5_5: SOLR-8701: CloudSolrClient decides that
there are no healthy nodes to handle a request too early.
SOLR-8701: CloudSolrClient decides that there are no healthy nodes to handle a request too early.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/607e91cd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/607e91cd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/607e91cd
Branch: refs/heads/branch_5_5
Commit: 607e91cdab50af1168f5bc8b8785cfa77f1e55ea
Parents: 39c5333
Author: markrmiller <ma...@apache.org>
Authored: Fri Feb 19 08:02:12 2016 -0500
Committer: anshum <an...@apache.org>
Committed: Tue Apr 19 14:13:09 2016 -0700
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
.../apache/solr/client/solrj/impl/CloudSolrClient.java | 13 +++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/607e91cd/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 88375ce..819e804 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -66,6 +66,9 @@ Bug Fixes
* SOLR-8683: Always consume the full request on the server, not just in the case of an error.
(Mark Miller)
+* SOLR-8701: CloudSolrClient decides that there are no healthy nodes to handle a request too early.
+ (Mark Miller)
+
======================= 5.5.0 =======================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/607e91cd/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index 7b74966..c7e670c 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -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);