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 7749d77b5aa [fix](pick-omit) pick-pr #59179 addition (#59309)
7749d77b5aa is described below
commit 7749d77b5aa6f3724e1f77aba490f758285c7fc8
Author: Refrain <[email protected]>
AuthorDate: Thu Dec 25 11:27:47 2025 +0800
[fix](pick-omit) pick-pr #59179 addition (#59309)
this pick #59179 omits some code from #57198.
and this pr's case needs to be self-test on local.
---
.../apache/doris/service/FrontendServiceImpl.java | 23 ++++++++++++++++++++++
.../test_create_partition_idempotence.groovy | 2 +-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 134ded342f6..ecb43dee2cb 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -77,6 +77,7 @@ import org.apache.doris.common.UserException;
import org.apache.doris.common.Version;
import org.apache.doris.common.annotation.LogException;
import org.apache.doris.common.util.DebugPointUtil;
+import org.apache.doris.common.util.DebugPointUtil.DebugPoint;
import org.apache.doris.common.util.Util;
import org.apache.doris.cooldown.CooldownDelete;
import org.apache.doris.datasource.CatalogIf;
@@ -3842,6 +3843,28 @@ public class FrontendServiceImpl implements
FrontendService.Iface {
} else {
bePathsMap =
tablet.getNormalReplicaBackendPathMap();
}
+ // The purpose of this injected code is to simulate
tablet rebalance.
+ // Before using this code to write tests, you should
ensure that your
+ // configuration is set to single replica.
+ if
(DebugPointUtil.isEnable("FE.FrontendServiceImpl.createPartition.MockRebalance"))
{
+ DebugPoint debugPoint =
DebugPointUtil.getDebugPoint(
+
"FE.FrontendServiceImpl.createPartition.MockRebalance");
+ int currentExecuteNum =
debugPoint.executeNum.incrementAndGet();
+ if (currentExecuteNum > 1) {
+ List<Long> allBeIds =
Env.getCurrentSystemInfo().getAllBackendIds(false);
+ // (assign different distribution information
to tablets)
+ for (Long beId : bePathsMap.keySet()) {
+ Long otherBeId = allBeIds.stream()
+ .filter(id -> id != beId)
+ .findFirst()
+ .orElse(null);
+ if (otherBeId != null) {
+ LOG.info("Mock rebalance: beId={}
otherBeId={}", beId, otherBeId);
+ bePathsMap.put(beId, otherBeId);
+ }
+ }
+ }
+ }
} catch (UserException ex) {
errorStatus.setErrorMsgs(Lists.newArrayList(ex.getMessage()));
result.setStatus(errorStatus);
diff --git
a/regression-test/suites/cloud_p0/tablets/test_create_partition_idempotence.groovy
b/regression-test/suites/cloud_p0/tablets/test_create_partition_idempotence.groovy
index 494754f657b..c4821537fe3 100644
---
a/regression-test/suites/cloud_p0/tablets/test_create_partition_idempotence.groovy
+++
b/regression-test/suites/cloud_p0/tablets/test_create_partition_idempotence.groovy
@@ -36,7 +36,7 @@ suite('test_create_partition_idempotence', 'docker') {
def options = new ClusterOptions()
options.feConfigs += [
- 'enable_debug_points = true',
+ 'enable_debug_points=true',
]
options.cloudMode = true
options.beNum = 3
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]