dsmiley commented on a change in pull request #17:
URL: https://github.com/apache/solr/pull/17#discussion_r655555107



##########
File path: 
solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
##########
@@ -560,10 +559,16 @@ public static void 
createCollectionZkNode(DistribStateManager stateManager, Stri
           }
 
           collectionProps.remove(ZkStateReader.NUM_SHARDS_PROP);  // we don't 
put numShards in the collections properties
+          collectionProps.remove(ZkStateReader.CONFIGNAME_PROP); // we don't 
write configName on a zk collection node
 
-          ZkNodeProps zkProps = new ZkNodeProps(collectionProps);
-          stateManager.makePath(collectionPath, Utils.toJSON(zkProps), 
CreateMode.PERSISTENT, false);
-
+          if (collectionProps.size() > 0) {
+            ZkNodeProps zkProps = new ZkNodeProps(collectionProps);
+            // create a node with collectionProps data
+            stateManager.makePath(collectionPath, Utils.toJSON(zkProps), 
CreateMode.PERSISTENT, false);

Review comment:
       Great; lets then not write props since there's nothing there.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to