risdenk commented on a change in pull request #1152: SOLR-14172: Collection 
metadata remains in zookeeper if too many shards requested
URL: https://github.com/apache/lucene-solr/pull/1152#discussion_r366413865
 
 

 ##########
 File path: 
solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
 ##########
 @@ -190,10 +190,12 @@ public void call(ClusterState clusterState, ZkNodeProps 
message, NamedList resul
       try {
         replicaPositions = buildReplicaPositions(ocmh.cloudManager, 
clusterState, clusterState.getCollection(collectionName), message, shardNames, 
sessionWrapper);
       } catch (Assign.AssignmentException e) {
-        ZkNodeProps deleteMessage = new ZkNodeProps("name", collectionName);
-        new DeleteCollectionCmd(ocmh).call(clusterState, deleteMessage, 
results);
+        deleteCollection(clusterState, results, collectionName);
         // unwrap the exception
         throw new SolrException(ErrorCode.SERVER_ERROR, e.getMessage(), 
e.getCause());
+      } catch (SolrException e) {
 
 Review comment:
   So one question I have is why is the error coming back from 
`buildReplicaPositions` not an `Assign.AssignmentException`? Is it because it 
is wrapped in a `SolrException` from the remote node? 

----------------------------------------------------------------
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


With regards,
Apache Git Services

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

Reply via email to