[fix](colocate) prohibit dead backend as destination backend in colocate balance (#18970)

This commit is contained in:
Luwei
2023-04-26 20:09:01 +08:00
committed by GitHub
parent e83d0d9b6a
commit b3b261e052
2 changed files with 21 additions and 0 deletions

View File

@ -427,6 +427,17 @@ public class ColocateTableCheckerAndBalancer extends MasterDaemon {
continue;
}
// Unavailable be has been removed from backendWithReplicaNum,
// but the conditions for judging unavailable be by
// getUnavailableBeIdsInGroup may be too loose. Under the
// default configuration (colocate_group_relocate_delay_second =
// 1800), a be that has been out of contact for 20 minutes can
// still be selected as the dest be.
if (!destBe.isAlive()) {
LOG.info("{} is not alive, not suitable as a dest be", destBe);
continue;
}
for (int seqIndex : seqIndexes) {
// the bucket index.
// eg: 0 / 3 = 0, so that the bucket index of the 4th backend id in flatBackendsPerBucketSeq is 0.