This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0-var
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0-var by this push:
new 22cab65d0ed [Fix](variant) pick alive replica and backend for command
desc (#28620)
22cab65d0ed is described below
commit 22cab65d0edcbe5e9c711b94940026adcb62d23f
Author: lihangyu <[email protected]>
AuthorDate: Tue Dec 19 17:27:44 2023 +0800
[Fix](variant) pick alive replica and backend for command desc (#28620)
---
.../apache/doris/common/util/FetchRemoteTabletSchemaUtil.java | 11 +++++++++--
gensrc/script/gen_build_version.sh | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/common/util/FetchRemoteTabletSchemaUtil.java
b/fe/fe-core/src/main/java/org/apache/doris/common/util/FetchRemoteTabletSchemaUtil.java
index d4f3aba15f0..9ba021d35ba 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/common/util/FetchRemoteTabletSchemaUtil.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/common/util/FetchRemoteTabletSchemaUtil.java
@@ -72,9 +72,12 @@ public class FetchRemoteTabletSchemaUtil {
Map<Long, Set<Long>> beIdToTabletId = Maps.newHashMap();
for (Tablet tablet : tablets) {
for (Replica replica : tablet.getReplicas()) {
- Set<Long> tabletIds = beIdToTabletId.computeIfAbsent(
+ // only need alive replica
+ if (replica.isAlive()) {
+ Set<Long> tabletIds = beIdToTabletId.computeIfAbsent(
replica.getBackendId(), k ->
Sets.newHashSet());
- tabletIds.add(tablet.getId());
+ tabletIds.add(tablet.getId());
+ }
}
}
@@ -85,6 +88,10 @@ public class FetchRemoteTabletSchemaUtil {
Long backendId = entry.getKey();
Set<Long> tabletIds = entry.getValue();
Backend backend =
Env.getCurrentEnv().getCurrentSystemInfo().getBackend(backendId);
+ // only need alive be
+ if (!backend.isAlive()) {
+ continue;
+ }
if (coordinatorBackend.size() < 2) {
coordinatorBackend.add(backend);
}
diff --git a/gensrc/script/gen_build_version.sh
b/gensrc/script/gen_build_version.sh
index 089e30fd9d0..300381d66f2 100755
--- a/gensrc/script/gen_build_version.sh
+++ b/gensrc/script/gen_build_version.sh
@@ -31,7 +31,7 @@ build_version_prefix="doris"
build_version_major=2
build_version_minor=0
build_version_patch=3
-build_version_rc_version="rc06-var06"
+build_version_rc_version="rc06-var07"
build_version="${build_version_prefix}-${build_version_major}.${build_version_minor}.${build_version_patch}-${build_version_rc_version}"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]