You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/15 02:18:19 UTC

[lucene-solr] branch reference_impl updated: #165 - Try and prevent ghost collection zk nodes.

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

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl by this push:
     new b779fcd  #165 - Try and prevent ghost collection zk nodes.
b779fcd is described below

commit b779fcd6913a10ff8b634715b69ecae75f82eb58
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Jul 14 21:18:03 2020 -0500

    #165 - Try and prevent ghost collection zk nodes.
---
 solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java b/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java
index e6e5ab0..56481ff 100644
--- a/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java
+++ b/solr/core/src/java/org/apache/solr/cloud/CloudConfigSetService.java
@@ -56,8 +56,9 @@ public class CloudConfigSetService extends ConfigSetService {
       if (!zkController.getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + colName, true)) {
         // TODO remove this functionality or maybe move to a CLI mechanism
         log.warn("Auto-creating collection (in ZK) from core descriptor (on disk).  This feature may go away!");
-        // nocommit
-        CreateCollectionCmd.createCollectionZkNode(zkController.getSolrCloudManager().getDistribStateManager(), colName, cd.getCloudDescriptor().getParams(), null);
+        if (!zkController.getCoreContainer().isShutDown()) {
+          CreateCollectionCmd.createCollectionZkNode(zkController.getSolrCloudManager().getDistribStateManager(), colName, cd.getCloudDescriptor().getParams(), null);
+        }
       }
     } catch (InterruptedException e) {
       Thread.currentThread().interrupt();