SOLR-4055: clone params for create calls

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1414744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-11-28 15:08:47 +00:00
parent 49a461a2b4
commit 446080b6b5
2 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -201,11 +201,7 @@ public class OverseerCollectionProcessor implements Runnable {
// 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 implements Runnable {
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);