This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 4c5d3a94a29 branch-3.1: [fix](group commit) group commit skip
decommissioning backend #58676 (#59118)
4c5d3a94a29 is described below
commit 4c5d3a94a29b04b99622602cbc27bbd1047e17de
Author: meiyi <[email protected]>
AuthorDate: Thu Dec 18 14:20:24 2025 +0800
branch-3.1: [fix](group commit) group commit skip decommissioning backend
#58676 (#59118)
pick #58676
---
.../src/main/java/org/apache/doris/load/GroupCommitManager.java | 9 ++++++---
.../insert_p0/test_group_commit_interval_ms_property.groovy | 8 ++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java
b/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java
index 684e86aa160..86d69ff8787 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java
@@ -289,7 +289,8 @@ public class GroupCommitManager {
}
List<String> backendsInfo = backends.stream()
.map(be -> "{ beId=" + be.getId() + ", alive=" + be.isAlive()
+ ", active=" + be.isActive()
- + ", decommission=" + be.isDecommissioned() + " }")
+ + ", decommissioned=" + be.isDecommissioned() + ",
decommissioning=" + be.isDecommissioning()
+ + " }")
.collect(Collectors.toList());
throw new LoadException("No suitable backend for cloud cluster=" +
cluster + ", backends = " + backendsInfo);
}
@@ -344,7 +345,8 @@ public class GroupCommitManager {
return null;
}
Backend backend =
Env.getCurrentSystemInfo().getBackend(backendId);
- if (backend != null && backend.isAlive() &&
!backend.isDecommissioned()) {
+ if (backend != null && backend.isAlive() &&
!backend.isDecommissioned()
+ && (!Config.isCloudMode() ||
!backend.isDecommissioning())) {
return backend.getId();
} else {
tableToBeMap.remove(encode(cluster, tableId));
@@ -361,7 +363,8 @@ public class GroupCommitManager {
OlapTable table = (OlapTable)
Env.getCurrentEnv().getInternalCatalog().getTableByTableId(tableId);
Collections.shuffle(backends);
for (Backend backend : backends) {
- if (backend.isAlive() && !backend.isDecommissioned()) {
+ if (backend.isAlive() && !backend.isDecommissioned() &&
(!Config.isCloudMode()
+ || !backend.isDecommissioning())) {
tableToBeMap.put(encode(cluster, tableId), backend.getId());
tableToPressureMap.put(tableId,
new
SlidingWindowCounter(table.getGroupCommitIntervalMs() / 1000 + 1));
diff --git
a/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy
b/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy
index c42d251ee03..56295ca07a8 100644
---
a/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy
+++
b/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy
@@ -52,7 +52,7 @@ suite("test_group_commit_interval_ms_property") {
DISTRIBUTED BY HASH (k) BUCKETS 8
PROPERTIES(
"replication_num" = "1",
- "group_commit_interval_ms"="10000"
+ "group_commit_interval_ms"="5000"
);
"""
@@ -61,11 +61,11 @@ suite("test_group_commit_interval_ms_property") {
sql """ set group_commit = async_mode; """
def res1 = sql """show create table ${test_table}"""
- assertTrue(res1.toString().contains("\"group_commit_interval_ms\"
= \"10000\""))
+ assertTrue(res1.toString().contains("\"group_commit_interval_ms\"
= \"5000\""))
def msg1 = group_commit_insert """insert into ${test_table}
values(1,1); """, 1
- Thread.sleep(2000);
+ Thread.sleep(100);
def msg2 = group_commit_insert """insert into ${test_table}
values(2,2) """, 1
@@ -78,7 +78,7 @@ suite("test_group_commit_interval_ms_property") {
def msg3 = group_commit_insert """insert into ${test_table}
values(3,3); """, 1
- Thread.sleep(8000);
+ Thread.sleep(6000);
def msg4 = group_commit_insert """insert into ${test_table}
values(4,4); """, 1
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]