This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new 260d982a770 [to dev/1.3] Make the root.__system database has a normal 
number of replicas (no longer forcing the replica to be 1)
260d982a770 is described below

commit 260d982a770a1dbca157f14fe984007eb1e6ee08
Author: Li Yu Heng <[email protected]>
AuthorDate: Mon Jun 16 17:32:03 2025 +0800

    [to dev/1.3] Make the root.__system database has a normal number of 
replicas (no longer forcing the replica to be 1)
---
 .../confignode/service/thrift/ConfigNodeRPCServiceProcessor.java  | 8 ++------
 .../apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
index 0daf96f0d25..b8ec6f773bd 100644
--- 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
+++ 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
@@ -392,9 +392,7 @@ public class ConfigNodeRPCServiceProcessor implements 
IConfigNodeRPCService.Ifac
               .setMessage("Failed to create database. The TTL should be 
positive.");
     }
 
-    if (isSystemDatabase) {
-      databaseSchema.setSchemaReplicationFactor(1);
-    } else if (!databaseSchema.isSetSchemaReplicationFactor()) {
+    if (!databaseSchema.isSetSchemaReplicationFactor()) {
       
databaseSchema.setSchemaReplicationFactor(configNodeConfig.getSchemaReplicationFactor());
     } else if (databaseSchema.getSchemaReplicationFactor() <= 0) {
       errorResp =
@@ -403,9 +401,7 @@ public class ConfigNodeRPCServiceProcessor implements 
IConfigNodeRPCService.Ifac
                   "Failed to create database. The schemaReplicationFactor 
should be positive.");
     }
 
-    if (isSystemDatabase) {
-      databaseSchema.setDataReplicationFactor(1);
-    } else if (!databaseSchema.isSetDataReplicationFactor()) {
+    if (!databaseSchema.isSetDataReplicationFactor()) {
       
databaseSchema.setDataReplicationFactor(configNodeConfig.getDataReplicationFactor());
     } else if (databaseSchema.getDataReplicationFactor() <= 0) {
       errorResp =
diff --git 
a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java
 
b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java
index 968fa4cc476..b70ecebfff2 100644
--- 
a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java
+++ 
b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java
@@ -77,7 +77,7 @@ public class IoTDBSessionReporter extends IoTDBReporter {
             this.sessionPool.executeQueryStatement(
                 "CREATE DATABASE "
                     + metricConfig.getInternalDatabase()
-                    + " WITH SCHEMA_REPLICATION_FACTOR=1, 
DATA_REPLICATION_FACTOR=1, SCHEMA_REGION_GROUP_NUM=1, 
DATA_REGION_GROUP_NUM=1")) {
+                    + " WITH SCHEMA_REGION_GROUP_NUM=1, 
DATA_REGION_GROUP_NUM=1")) {
           if (!result2.hasNext()) {
             LOGGER.error("IoTDBSessionReporter checkOrCreateDatabase failed.");
           }

Reply via email to