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/28 06:21:13 UTC
[GitHub] [incubator-doris] wangbo commented on a change in pull request #5250: Fix 5243 Skip repair replica not in colocate group.
wangbo commented on a change in pull request #5250:
URL: https://github.com/apache/incubator-doris/pull/5250#discussion_r565845937
##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
##########
@@ -542,19 +542,20 @@ public long getDataSize(boolean singleReplica) {
* No need to check if backend is available. We consider all backends in 'backendsSet' are available,
* If not, unavailable backends will be relocated by CalocateTableBalancer first.
*/
- public TabletStatus getColocateHealthStatus(long visibleVersion, long visibleVersionHash,
- int replicationNum, Set<Long> backendsSet) {
+ public TabletStatus getColocateHealthStatus(long visibleVersion, int replicationNum, Set<Long> backendsSet) {
// 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
Review comment:
```suggestion
// We don't care about replicas that are not in backendsSet.
// eg: replicaBackendIds=(1,2,3,4); backendsSet=(1,2,3), then replica 4 should be skipped here and then goto ```COLOCATE_REDUNDANT``` in step 3
```
----------------------------------------------------------------
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