From cd6c2268da3310656514161a46d945361cdd6911 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Wed, 9 Oct 2013 10:34:15 +0000 Subject: [PATCH] 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 --- solr/CHANGES.txt | 3 +++ solr/core/src/java/org/apache/solr/cloud/Overseer.java | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index ce6d55a61c8..32966d187db 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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 diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java index 2172da191da..406f58a25a9 100644 --- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java +++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java @@ -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 shardNames = new ArrayList(); //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); - } + getShardNames(numShards, shardNames); state = createCollection(state, collection, shardNames, message); }