Skip to content

Apache Lucene open-source search software

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

Shalin Shekhar Mangarcd6c2268da33
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<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);
- }
+ getShardNames(numShards, shardNames);
state = createCollection(state, collection, shardNames, message);
}