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 2021/01/17 07:25:46 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #5250: Fix 5243 Skip repair replica not in colocate group.

morningman commented on a change in pull request #5250:
URL: https://github.com/apache/incubator-doris/pull/5250#discussion_r559090364



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
##########
@@ -547,14 +547,16 @@ public TabletStatus getColocateHealthStatus(long visibleVersion, long visibleVer
 
         // 1. check if replicas' backends are mismatch
         Set<Long> replicaBackendIds = getBackendIds();
-        for (Long backendId : backendsSet) {
-            if (!replicaBackendIds.contains(backendId)) {
-                return TabletStatus.COLOCATE_MISMATCH;
-            }
+        if (!replicaBackendIds.containsAll(backendsSet)) {
+            return TabletStatus.COLOCATE_MISMATCH;
         }
 
         // 2. check version completeness
         for (Replica replica : replicas) {
+            if (!backendsSet.contains(replica.getBackendId())) {
+                // We don't care about replicas that are not in backendsSet
+                continue;
+            }

Review comment:
       Why not fall down to COLOCATE_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.

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