serhiy-bzhezytskyy commented on code in PR #4760:
URL: https://github.com/apache/solr/pull/4760#discussion_r3822364254
##########
solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java:
##########
@@ -214,9 +215,11 @@ public void testPeersyncFailureReplicationSuccess() throws
Exception {
// but clusterShape will also return true if replica is not live -- which
we don't want
Predicate<DocCollection> collectionStatePredicate =
collectionState -> {
- for (Replica r : collectionState.getReplicas()) {
- if (r.getNodeName().equals(oldNodeName.get())) {
- return r.getState() == Replica.State.DOWN;
+ for (Slice slice : collectionState) {
+ for (Replica r : slice.getReplicas()) {
+ if (r.getNodeName().equals(oldNodeName.get())) {
+ return r.getState() == Replica.State.DOWN;
+ }
}
}
return false;
Review Comment:
Done -- `getReplicaStream().filter(...).findFirst().map(...).orElse(false)`.
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]