Apache Lucene open-source search software
SOLR-14340: Remove unnecessary configset verification checks Improves CLUSTERSTATUS times for massive clusters. Closes #1373
mariemataad814ba63c9
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 39065e2826c..4df1d991792 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -64,6 +64,9 @@ Optimizations---------------------* SOLR-8306: Do not collect expand documents when expand.rows=0 (Marshall Sanders, Amelia Henderson)+* SOLR-14340: Remove unnecessary configset verification checks when SolrCloud merely wants to know which configset a+ collection is using. Improves CLUSTERSTATUS times for massive clusters. (Mathieu Marie, David Smiley)+Bug Fixes---------------------* SOLR-13264: IndexSizeTrigger aboveOp / belowOp properties not in valid properties.diff --git a/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java b/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.javaindex 6583db77cde..bf1ad4f76b6 100644--- a/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java+++ b/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java@@ -68,7 +68,6 @@ public class CloudConfigSetService extends ConfigSetService {// The configSet is read from ZK and populated. Ignore CD's pre-existing configSet; only populated in standalonefinal String configSetName;try {- //TODO readConfigName() also validates the configSet exists but seems needless. We'll get errors soon enough.configSetName = zkController.getZkStateReader().readConfigName(colName);cd.setConfigSet(configSetName);} catch (KeeperException ex) {diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionAPI.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionAPI.javaindex 1fb46a28caa..26fd5610611 100644--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionAPI.java+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionAPI.java@@ -269,7 +269,6 @@ public class TestCollectionAPI extends ReplicaPropertiesBase {NamedList<Object> collections = (NamedList<Object>) cluster.get("collections");assertNotNull("Collections should not be null in cluster state", collections);assertNotNull("Testing to insure collections are returned", collections.get(COLLECTION_NAME1));- assertNull("Should have failed to find: " + collection + " because the configset was delted. ", collections.get(collection));}}diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.javaindex a7d7e37fb00..4c00b24348a 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java@@ -283,6 +283,7 @@ public class ZkStateReader implements SolrCloseable {/*** Returns config set name for collection.+ * TODO move to DocCollection (state.json).** @param collection to return config set name for*/@@ -294,10 +295,6 @@ public class ZkStateReader implements SolrCloseable {log.debug("Loading collection config from: [{}]", path);try {- if (zkClient.exists(path, true) == false) {- log.warn("No collection found at path {}.", path);- throw new KeeperException.NoNodeException("No collection found at path: " + path);- }byte[] data = zkClient.getData(path, null, null, true);if (data == null) {log.warn("No config data found at path {}.", path);@@ -311,14 +308,6 @@ public class ZkStateReader implements SolrCloseable {log.warn("No config data found at path{}. ", path);throw new KeeperException.NoNodeException("No config data found at path: " + path);}-- String configPath = CONFIGS_ZKNODE + "/" + configName;- if (zkClient.exists(configPath, true) == false) {- log.error("Specified config=[{}] does not exist in ZooKeeper at location=[{}]", configName, configPath);- throw new KeeperException.NoNodeException("Specified config=[" + configName + "] does not exist in ZooKeeper at location=[" + configPath + "]");- } else {- log.debug("path=[{}] [{}]=[{}] specified config exists in ZooKeeper", configPath, CONFIGNAME_PROP, configName);- }} catch (InterruptedException e) {SolrZkClient.checkInterrupted(e);log.warn("Thread interrupted when loading config name for collection {}", collection);