dsmiley commented on a change in pull request #17:
URL: https://github.com/apache/solr/pull/17#discussion_r651237184
##########
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:
Try to create one:
https://nightlies.apache.org/solr/draft-guides/solr-reference-guide-main/collection-management.html#create
with `property.foo=bar` and see if foo=bar winds up in that JSON. I think it
will be 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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]