aparnasuresh85 commented on code in PR #2393:
URL: https://github.com/apache/solr/pull/2393#discussion_r1558250392


##########
solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java:
##########
@@ -1066,13 +1066,14 @@ private Map<String, Integer> 
checkStateVersionsAreValid(String stateVer) {
 
   protected SolrCore getCoreByCollection(String collectionName, boolean 
isPreferLeader) {
     ZkStateReader zkStateReader = cores.getZkController().getZkStateReader();
-
     ClusterState clusterState = zkStateReader.getClusterState();
-    DocCollection collection = 
clusterState.getCollectionOrNull(collectionName, true);
+    DocCollection collection = resolveDocCollection(collectionName);
+    // the usage of getCoreByCollection assumes that if null is returned, 
collection is found, but
+    // replicas might not
+    // have been created. Hence returning null here would be misleading...

Review Comment:
   Done



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to