morningman commented on a change in pull request #8123:
URL: https://github.com/apache/incubator-doris/pull/8123#discussion_r817368650
##########
File path: fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
##########
@@ -479,6 +479,29 @@ public int getTabletOrderIdx() {
return tabletOrderIdx;
}
+ 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 recoverd = false;
+ for (Replica replica : tablet.getReplicas()) {
+ if (replica.isBad() && replica.tooSlow() &&
!chosenReplica.equals(replica)) {
Review comment:
`replica.isBad()` can be removed
--
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]