pvcnt commented on code in PR #2039: URL: https://github.com/apache/solr/pull/2039#discussion_r1409418225
########## solr/core/src/java/org/apache/solr/cloud/api/collections/CreateShardCmd.java: ########## @@ -97,33 +101,30 @@ public void call(ClusterState clusterState, ZkNodeProps message, NamedList<Objec CollectionHandlingUtils.waitForNewShard(collectionName, sliceName, ccc.getZkStateReader()); String async = message.getStr(ASYNC); - ZkNodeProps addReplicasProps = - new ZkNodeProps( + Map<String, Object> addReplicasProps = + Utils.makeMap( COLLECTION_PROP, - collectionName, + (Object) collectionName, SHARD_ID_PROP, sliceName, - ZkStateReader.NRT_REPLICAS, - String.valueOf(numReplicas.get(Replica.Type.NRT)), - ZkStateReader.TLOG_REPLICAS, - String.valueOf(numReplicas.get(Replica.Type.TLOG)), - ZkStateReader.PULL_REPLICAS, - String.valueOf(numReplicas.get(Replica.Type.PULL)), CollectionHandlingUtils.CREATE_NODE_SET, message.getStr(CollectionHandlingUtils.CREATE_NODE_SET), CommonAdminParams.WAIT_FOR_FINAL_STATE, Boolean.toString(waitForFinalState)); + for (Replica.Type replicaType : numReplicas.keySet()) { Review Comment: I added a `ReplicaCount#addParams` method which adds properties to a map. -- 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. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org 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