You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/15 02:03:18 UTC

[GitHub] [doris] weizuo93 commented on a diff in pull request #10827: [fix](alter)(tablet-scheduler) fix unexpected exception with compaction_too_slow message when add rollup for olap table

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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org