morningman commented on a change in pull request #5250:
URL: https://github.com/apache/incubator-doris/pull/5250#discussion_r559093890
##########
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:
Oh I miss understood
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]