You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by no...@apache.org on 2022/11/10 03:28:08 UTC

[solr] branch main updated: SOLR-16541 remove the 'numShards' system property (#1170)

This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new e85297585cb SOLR-16541 remove the 'numShards' system property (#1170)
e85297585cb is described below

commit e85297585cb7aef3ec0e2ff33fdf309881422ebe
Author: Noble Paul <no...@users.noreply.github.com>
AuthorDate: Thu Nov 10 14:28:03 2022 +1100

    SOLR-16541 remove the 'numShards' system property (#1170)
---
 solr/CHANGES.txt                                           | 2 ++
 solr/core/src/java/org/apache/solr/cloud/ZkController.java | 4 ----
 2 files changed, 2 insertions(+), 4 deletions(-)

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;