weizuo93 commented on code in PR #10827:
URL: https://github.com/apache/doris/pull/10827#discussion_r921743580
##########
fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java:
##########
@@ -528,27 +528,24 @@ public int getTabletOrderIdx() {
public boolean compactionRecovered() {
Replica chosenReplica = null;
long maxVersionCount = -1;
- long minVersionCount = Integer.MAX_VALUE;
for (Replica replica : tablet.getReplicas()) {
if (replica.getVersionCount() > maxVersionCount) {
maxVersionCount = replica.getVersionCount();
chosenReplica = replica;
}
- if (replica.getVersionCount() < minVersionCount) {
- minVersionCount = replica.getVersionCount();
- }
}
boolean recovered = false;
for (Replica replica : tablet.getReplicas()) {
- if (replica.isAlive() && replica.tooSlow() &&
!chosenReplica.equals(replica)) {
+ if (replica.isAlive() && !replica.isBad() && replica.tooSlow() &&
(!chosenReplica.equals(replica)
Review Comment:
`!replica.isBad()` is redundant.
--
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]