mirror of https://github.com/apache/lucene.git
use sendToLeaders rather than replicas != null to determine if we add repicas to end of the list
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378922 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e573d0ea6
commit
e31ddf3554
|
@ -242,14 +242,16 @@ public class CloudSolrServer extends SolrServer {
|
|||
theUrlList.addAll(urlList);
|
||||
}
|
||||
Collections.shuffle(theUrlList, rand);
|
||||
if (replicas != null) {
|
||||
if (sendToLeaders) {
|
||||
ArrayList<String> theReplicas = new ArrayList<String>(replicasList.size());
|
||||
theReplicas.addAll(replicasList);
|
||||
Collections.shuffle(theReplicas, rand);
|
||||
|
||||
// System.out.println("leaders:" + theUrlList);
|
||||
// System.out.println("replicas:" + theReplicas);
|
||||
theUrlList.addAll(theReplicas);
|
||||
}
|
||||
//System.out.println("########################## MAKING REQUEST TO " + theUrlList);
|
||||
|
||||
// System.out.println("########################## MAKING REQUEST TO " + theUrlList);
|
||||
|
||||
LBHttpSolrServer.Req req = new LBHttpSolrServer.Req(request, theUrlList);
|
||||
LBHttpSolrServer.Rsp rsp = lbServer.request(req);
|
||||
|
|
Loading…
Reference in New Issue