From 7a73a2a9b3260ee266c26a979696f1606e6d485f Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Tue, 3 Feb 2015 14:44:32 +0000 Subject: [PATCH] SOLR-6787: .system collection create fails if /configs dir is not present in ZK git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1656747 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/solr/handler/admin/CollectionsHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java index e82c6a6777c..9df343bb280 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java @@ -869,6 +869,7 @@ public class CollectionsHandler extends RequestHandlerBase { private void createSysConfigSet() throws KeeperException, InterruptedException { SolrZkClient zk = coreContainer.getZkController().getZkStateReader().getZkClient(); + createNodeIfNotExists(zk,ZkStateReader.CONFIGS_ZKNODE, null); createNodeIfNotExists(zk,ZkStateReader.CONFIGS_ZKNODE+"/"+SYSTEM_COLL, null); createNodeIfNotExists(zk,ZkStateReader.CONFIGS_ZKNODE+"/"+SYSTEM_COLL+"/schema.xml", BlobHandler.SCHEMA.replaceAll("'","\"").getBytes(StandardCharsets.UTF_8)); createNodeIfNotExists(zk, ZkStateReader.CONFIGS_ZKNODE + "/" + SYSTEM_COLL + "/solrconfig.xml", BlobHandler.CONF.replaceAll("'", "\"").getBytes(StandardCharsets.UTF_8));