HoustonPutman commented on code in PR #3451:
URL: https://github.com/apache/solr/pull/3451#discussion_r2255246575
##########
solr/core/src/java/org/apache/solr/cloud/ExclusiveSliceProperty.java:
##########
@@ -129,6 +129,10 @@ private boolean isActive(Replica replica) {
return replica.getState() == Replica.State.ACTIVE;
}
+ private boolean canBeLeader(Replica replica) {
+ return replica.getType() == Replica.Type.NRT || replica.getType() ==
Replica.Type.TLOG;
+ }
+
Review Comment:
```suggestion
```
##########
solr/core/src/java/org/apache/solr/cloud/ExclusiveSliceProperty.java:
##########
@@ -151,6 +155,12 @@ private boolean collectCurrentPropStats() {
}
continue;
}
+ if (SliceMutator.PREFERRED_LEADER_PROP.equals(property)
+ && !canBeLeader(
+ replica)) { // omit replicas that cannot potentially be leader
from preferredLeader
Review Comment:
```suggestion
// omit replicas that cannot potentially be leader from
preferredLeader
&& replica.getType().leaderEligible) {
```
--
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]