serhiy-bzhezytskyy commented on code in PR #4760:
URL: https://github.com/apache/solr/pull/4760#discussion_r3821985812


##########
solr/core/src/java/org/apache/solr/cloud/api/collections/ReindexCollectionCmd.java:
##########
@@ -714,9 +715,11 @@ private Replica getReplicaForDaemon(SolrResponse rsp, 
DocCollection coll) {
       return null;
     }
     // build a baseUrl of the replica
-    for (Replica r : coll.getReplicas()) {
-      if (replicaName.equals(r.getCoreName())) {
-        return r;
+    for (Slice slice : collectionState) {
+      for (Replica r : slice.getReplicas()) {
+        if (replicaName.equals(r.getCoreName())) {
+          return r;
+        }
       }
     }

Review Comment:
   Done -- collapsed to 
`getReplicaStream().filter(...).findFirst().orElse(null)`.
   
   AI-assisted (Claude Sonnet 5)



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