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 16:18:19 UTC

svn commit: r1378949 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java

Author: markrmiller
Date: Thu Aug 30 14:18:19 2012
New Revision: 1378949

URL: http://svn.apache.org/viewvc?rev=1378949&view=rev
Log:
use sendToLeaders rather than replicas != null to determine if we add repicas to end of the list

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java

Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1378949&r1=1378948&r2=1378949&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Thu Aug 30 14:18:19 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);