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/11/28 16:08:49 UTC

svn commit: r1414744 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java

Author: markrmiller
Date: Wed Nov 28 15:08:47 2012
New Revision: 1414744

URL: http://svn.apache.org/viewvc?rev=1414744&view=rev
Log:
SOLR-4055: clone params for create calls

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1414744&r1=1414743&r2=1414744&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Nov 28 15:08:47 2012
@@ -206,7 +206,7 @@ Bug Fixes
 
 * SOLR-4055: Fix a thread safety issue with the Collections API that could
   cause actions to be targeted at the wrong SolrCores. 
-  (Raintung Li via Mark Miller)
+  (Raintung Li, Per Steffensen via Mark Miller)
 
 * SOLR-3993: If multiple SolrCore's for a shard coexist on a node, on cluster
   restart, leader election would stall until timeout, waiting to see all of 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java?rev=1414744&r1=1414743&r2=1414744&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java Wed Nov 28 15:08:47 2012
@@ -201,11 +201,7 @@ public class OverseerCollectionProcessor
     // we need to look at every node and see how many cores it serves
     // add our new cores to existing nodes serving the least number of cores
     // but (for now) require that each core goes on a distinct node.
-    
-    ModifiableSolrParams params = new ModifiableSolrParams();
-    params.set(CoreAdminParams.ACTION, CoreAdminAction.CREATE.toString());
-    
-    
+
     // TODO: add smarter options that look at the current number of cores per node?
     // for now we just go random
     Set<String> nodes = clusterState.getLiveNodes();
@@ -230,6 +226,11 @@ public class OverseerCollectionProcessor
     for (String replica : createOnNodes) {
       // TODO: this does not work if original url had _ in it
       // We should have a master list
+      
+      // Need to create new params for each request
+      ModifiableSolrParams params = new ModifiableSolrParams();
+      params.set(CoreAdminParams.ACTION, CoreAdminAction.CREATE.toString());
+      
       replica = replica.replaceAll("_", "/");
       params.set(CoreAdminParams.NAME, name);
       params.set("collection.configName", configName);