You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2012/08/30 15:18:30 UTC
svn commit: r1378922 -
/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Author: markrmiller
Date: Thu Aug 30 13:18:29 2012
New Revision: 1378922
URL: http://svn.apache.org/viewvc?rev=1378922&view=rev
Log:
use sendToLeaders rather than replicas != null to determine if we add repicas to end of the list
Modified:
lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1378922&r1=1378921&r2=1378922&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Thu Aug 30 13:18:29 2012
@@ -242,14 +242,16 @@ public class CloudSolrServer extends Sol
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);