Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16541 remove the 'numShards' system property (#1170)

Noble Paule85297585cb7
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 7a2e5aedb37..04a21340280 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -116,6 +116,8 @@ Other Changes
* SOLR-16529: Upgrade jaeger-client to 1.8.1 (janhoy)
+* SOLR-16541: Eliminate the 'numShards' system property (noble)
+
================== 9.1.0 ==================
New Features
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index 513920f7432..4be2ec1ceeb 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -1699,10 +1699,6 @@ public class ZkController implements Closeable {
log.debug("publishing state={}", state);
// System.out.println(Thread.currentThread().getStackTrace()[3]);
Integer numShards = cd.getCloudDescriptor().getNumShards();
- if (numShards == null) { // XXX sys prop hack
- log.debug("numShards not found on descriptor - reading it from system property");
- numShards = Integer.getInteger(ZkStateReader.NUM_SHARDS_PROP);
- }
assert collection != null && collection.length() > 0;