SOLR-5321: Remove unnecessary code in Overseer.updateState method which tries to use router name from message where none is ever sent

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1530555 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2013-10-09 10:34:15 +00:00
parent ac6633d1f3
commit cd6c2268da
2 changed files with 4 additions and 7 deletions

View File

@ -147,6 +147,9 @@ Other Changes
* SOLR-5319: Remove unused and incorrect router name from Collection ZK nodes.
(Jessica Cheng via shalin)
* SOLR-5321: Remove unnecessary code in Overseer.updateState method which tries to
use router name from message where none is ever sent. (shalin)
================== 4.5.0 ==================
Versions of Major Components

View File

@ -308,18 +308,12 @@ public class Overseer {
Integer numShards = message.getInt(ZkStateReader.NUM_SHARDS_PROP, null);
log.info("Update state numShards={} message={}", numShards, message);
String router = message.getStr(OverseerCollectionProcessor.ROUTER,DocRouter.DEFAULT_NAME);
List<String> shardNames = new ArrayList<String>();
//collection does not yet exist, create placeholders if num shards is specified
boolean collectionExists = state.getCollections().contains(collection);
if (!collectionExists && numShards!=null) {
if(ImplicitDocRouter.NAME.equals(router)){
getShardNames(shardNames, message.getStr("shards",null));
numShards = shardNames.size();
}else {
getShardNames(numShards, shardNames);
}
state = createCollection(state, collection, shardNames, message);
}