This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new a4ed023bad [fix](colocation) fix decommission failure with 2 BEs and
colocation table (#12644)
a4ed023bad is described below
commit a4ed023bade9d011d9fdf86457deb672e5318d56
Author: Mingyu Chen <[email protected]>
AuthorDate: Mon Sep 19 08:34:50 2022 +0800
[fix](colocation) fix decommission failure with 2 BEs and colocation table
(#12644)
This PR fix:
2 Backends.
Create tables with colocation group, 1 replica.
Decommission one of Backends.
The tablet on decommissioned Backend is not reduced.
This is a bug of ColocateTableCheckerAndBalancer.
---
fe/fe-core/src/main/java/org/apache/doris/alter/SystemHandler.java | 2 +-
.../java/org/apache/doris/clone/ColocateTableCheckerAndBalancer.java | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/SystemHandler.java
b/fe/fe-core/src/main/java/org/apache/doris/alter/SystemHandler.java
index 9d2b49531a..a6fe838fa8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/SystemHandler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/SystemHandler.java
@@ -96,7 +96,7 @@ public class SystemHandler extends AlterHandler {
}
LOG.info("backend {} lefts {} replicas to decommission: {}", beId,
backendTabletIds.size(),
- backendTabletIds.size() <= 20 ? backendTabletIds : "too
many");
+ backendTabletIds.subList(0, Math.min(10,
backendTabletIds.size())));
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/clone/ColocateTableCheckerAndBalancer.java
b/fe/fe-core/src/main/java/org/apache/doris/clone/ColocateTableCheckerAndBalancer.java
index 282d361904..c7848b3937 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/clone/ColocateTableCheckerAndBalancer.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/clone/ColocateTableCheckerAndBalancer.java
@@ -385,6 +385,7 @@ public class ColocateTableCheckerAndBalancer extends
MasterDaemon {
if (!seqIndexes.isEmpty()) {
srcBeId = beId;
hasUnavailableBe = true;
+ LOG.info("find unavailable backend {} in colocate group:
{}", beId, groupId);
break;
}
}
@@ -394,7 +395,7 @@ public class ColocateTableCheckerAndBalancer extends
MasterDaemon {
unavailableBeIds, statistic,
flatBackendsPerBucketSeq);
// if there is only one available backend and no unavailable
bucketId to relocate, end the outer loop
- if (backendWithReplicaNum.size() <= 1) {
+ if (backendWithReplicaNum.size() <= 1 && !hasUnavailableBe) {
break;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]