NazerkeBS commented on a change in pull request #17: URL: https://github.com/apache/solr/pull/17#discussion_r642606592
########## File path: solr/core/src/java/org/apache/solr/cloud/overseer/ClusterStateMutator.java ########## @@ -109,11 +110,27 @@ public ZkWriteCommand createCollection(ClusterState clusterState, ZkNodeProps me collectionProps.put("autoCreated", "true"); } + addConfigNameToProps(message, collectionProps); + DocCollection newCollection = new DocCollection(cName, slices, collectionProps, router, -1); return new ZkWriteCommand(cName, newCollection); } + public static void addConfigNameToProps(ZkNodeProps message, Map<String, Object> collectionProps) { + // put configName in props so that it will appear in state.json + final String configName = (String) message.getProperties().get(CollectionAdminParams.COLL_CONF); + + if (configName != null) { + collectionProps.put(ZkStateReader.CONFIGNAME_PROP, configName); + } + + // if collection.configName is already in props rename it to configName + if (collectionProps.containsKey(CollectionAdminParams.COLL_CONF)) { Review comment: I took a look around ClusterStateMutator and CollectionMutator. Apparently CollectionMutator adds `collection.configName` . `OverseerModifyCollectionTest` failed when I removed this condition. Then I updated CollectionMutator to rename the key - collection.configName -> configName -- 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