This is an automated email from the ASF dual-hosted git repository.
JackieTien97 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 150a14c38cb [IT] Make integrationTest.dataRegionPerDataNode reach the
ConfigNode (#19121)
150a14c38cb is described below
commit 150a14c38cb0d442cb12923cab699ff8104ad557
Author: Jackie Tien <[email protected]>
AuthorDate: Wed Nov 4 15:25:52 2026 +0800
[IT] Make integrationTest.dataRegionPerDataNode reach the ConfigNode
(#19121)
---
integration-test/pom.xml | 2 +-
.../org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index 05b8ce8b1d1..779c059e2d6 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -348,7 +348,7 @@
<TestEnv>${integrationTest.testEnv}</TestEnv>
<RandomSelectWriteNode>${integrationTest.randomSelectWriteNode}</RandomSelectWriteNode>
<ReadAndVerifyWithMultiNode>${integrationTest.readAndVerifyWithMultiNode}</ReadAndVerifyWithMultiNode>
-
<DataRegionPerDataNode>${integrationTest.dataRegionPerDataNode}</DataRegionPerDataNode>
+
<integrationTest.dataRegionPerDataNode>${integrationTest.dataRegionPerDataNode}</integrationTest.dataRegionPerDataNode>
<lightWeightStandaloneMode.configNodeNumber>${lightWeightStandaloneMode.configNodeNumber}</lightWeightStandaloneMode.configNodeNumber>
<lightWeightStandaloneMode.dataNodeNumber>${lightWeightStandaloneMode.dataNodeNumber}</lightWeightStandaloneMode.dataNodeNumber>
<lightWeightStandaloneMode.configNodeConsensus>${lightWeightStandaloneMode.configNodeConsensus}</lightWeightStandaloneMode.configNodeConsensus>
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
index aafb3641fc1..f819ad48196 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
@@ -40,6 +40,8 @@ import static
org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_MAX_DI
import static
org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_MAX_HEAP_SIZE;
import static
org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_RATIS_LOG_APPENDER_BUFFER_SIZE_MAX;
import static
org.apache.iotdb.it.env.cluster.ClusterConstant.DATA_REGION_CONSENSUS_PROTOCOL_CLASS;
+import static
org.apache.iotdb.it.env.cluster.ClusterConstant.DATA_REGION_PER_DATANODE;
+import static
org.apache.iotdb.it.env.cluster.ClusterConstant.DATA_REGION_PER_DATA_NODE;
import static
org.apache.iotdb.it.env.cluster.ClusterConstant.DATA_REPLICATION_FACTOR;
import static
org.apache.iotdb.it.env.cluster.ClusterConstant.DEFAULT_CONFIG_NODE_COMMON_PROPERTIES;
import static
org.apache.iotdb.it.env.cluster.ClusterConstant.DEFAULT_CONFIG_NODE_PROPERTIES;
@@ -55,6 +57,7 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper {
private final boolean isSeed;
private final String defaultNodePropertiesFile;
private final String defaultCommonPropertiesFile;
+ private final int regionPerDataNode;
public ConfigNodeWrapper(
final boolean isSeed,
@@ -72,6 +75,7 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper {
EnvUtils.getFilePathFromSysVar(DEFAULT_CONFIG_NODE_PROPERTIES,
clusterIndex);
this.defaultCommonPropertiesFile =
EnvUtils.getFilePathFromSysVar(DEFAULT_CONFIG_NODE_COMMON_PROPERTIES,
clusterIndex);
+ this.regionPerDataNode =
EnvUtils.getIntFromSysVar(DATA_REGION_PER_DATANODE, 0, clusterIndex);
// initialize mutable properties
reloadMutableFields();
@@ -152,6 +156,10 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper
{
mutableCommonProperties.setProperty(SCHEMA_REPLICATION_FACTOR, "1");
mutableCommonProperties.setProperty(DATA_REPLICATION_FACTOR, "1");
+ // Only ConfigNode reads this. Keep it a common property so that a value
set by a test through
+ // CommonConfig still takes precedence: node properties are written after
common ones.
+ mutableCommonProperties.setProperty(
+ DATA_REGION_PER_DATA_NODE, String.valueOf(regionPerDataNode));
mutableNodeProperties.put(CN_CONNECTION_TIMEOUT_MS, "30000");