You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2023/01/11 06:55:15 UTC

[iotdb] branch beyyes/rc-1.0.1 created (now d93d6a4a90)

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

caogaofei pushed a change to branch beyyes/rc-1.0.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at d93d6a4a90 [To rel/1.0][IOTDB-5389] Cause DataNode startup to fail when wal_mode is disabled in IoTConsensus (#8817)

This branch includes the following new commits:

     new 82617d7639 [To rel/1.0][IOTDB-5285] TimePartition may be error when restarting with different time partition configuration (#8803)
     new d93d6a4a90 [To rel/1.0][IOTDB-5389] Cause DataNode startup to fail when wal_mode is disabled in IoTConsensus (#8817)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 02/02: [To rel/1.0][IOTDB-5389] Cause DataNode startup to fail when wal_mode is disabled in IoTConsensus (#8817)

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch beyyes/rc-1.0.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit d93d6a4a903aaa3998bb3f8e78a9db02e8cf5d15
Author: Potato <ta...@apache.org>
AuthorDate: Tue Jan 10 20:53:58 2023 +0800

    [To rel/1.0][IOTDB-5389] Cause DataNode startup to fail when wal_mode is disabled in IoTConsensus (#8817)
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
 server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
index 9cc4eadad4..7c14e6cf08 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
@@ -303,6 +303,12 @@ public class IoTDBStartCheck {
         systemProperties.forEach((k, v) -> properties.setProperty(k, v.get()));
         properties.store(outputStream, SYSTEM_PROPERTIES_STRING);
       }
+      if (config.isClusterMode()
+          && config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.IOT_CONSENSUS)
+          && config.getWalMode().equals(WALMode.DISABLE)) {
+        throw new ConfigurationException(
+            "Configuring the WALMode as disable is not supported under IoTConsensus");
+      }
     } else {
       // check whether upgrading from <=v0.9
       if (!properties.containsKey(IOTDB_VERSION_STRING)) {


[iotdb] 01/02: [To rel/1.0][IOTDB-5285] TimePartition may be error when restarting with different time partition configuration (#8803)

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch beyyes/rc-1.0.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 82617d7639e8f33083abdc238462551fac490ddd
Author: Alan Choo <43...@users.noreply.github.com>
AuthorDate: Tue Jan 10 18:36:57 2023 +0800

    [To rel/1.0][IOTDB-5285] TimePartition may be error when restarting with different time partition configuration (#8803)
    
    * [(cherry picked from commit f2b9c0ebd13da841dcdc8afc24d9531eef1f3063)
---
 .../org/apache/iotdb/it/utils/TsFileGenerator.java |   5 +-
 .../confignode/it/IoTDBConfigNodeSnapshotIT.java   |   8 +-
 .../it/cluster/IoTDBClusterRestartIT.java          |   5 -
 .../it/partition/IoTDBPartitionDurableIT.java      |   9 +-
 .../it/partition/IoTDBPartitionGetterIT.java       |   8 +-
 .../partition/IoTDBPartitionInheritPolicyIT.java   |   8 +-
 .../org/apache/iotdb/db/it/IOTDBLoadTsFileIT.java  |  78 ++--
 .../org/apache/iotdb/db/client/ConfigNodeInfo.java |   2 +-
 .../org/apache/iotdb/db/conf/IoTDBStartCheck.java  | 434 ++++++++-------------
 .../java/org/apache/iotdb/db/service/DataNode.java |   6 +-
 10 files changed, 209 insertions(+), 354 deletions(-)

diff --git a/integration-test/src/main/java/org/apache/iotdb/it/utils/TsFileGenerator.java b/integration-test/src/main/java/org/apache/iotdb/it/utils/TsFileGenerator.java
index d04d1558ec..c790e0b92f 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/utils/TsFileGenerator.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/utils/TsFileGenerator.java
@@ -88,7 +88,7 @@ public class TsFileGenerator implements AutoCloseable {
     device2MeasurementSchema.put(path, measurementSchemaList);
   }
 
-  public void generateData(String device, int number, boolean isAligned)
+  public void generateData(String device, int number, long timeGap, boolean isAligned)
       throws IOException, WriteProcessException {
     List<MeasurementSchema> schemas = device2MeasurementSchema.get(device);
     TreeSet<Long> timeSet = device2TimeSet.get(device);
@@ -100,7 +100,8 @@ public class TsFileGenerator implements AutoCloseable {
 
     for (long r = 0; r < number; r++) {
       int row = tablet.rowSize++;
-      timestamps[row] = ++startTime;
+      startTime += timeGap;
+      timestamps[row] = startTime;
       timeSet.add(startTime);
       for (int i = 0; i < sensorNum; i++) {
         generateDataPoint(values[i], row, schemas.get(i));
diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/IoTDBConfigNodeSnapshotIT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/IoTDBConfigNodeSnapshotIT.java
index 1348db3d0d..6e239be816 100644
--- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/IoTDBConfigNodeSnapshotIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/IoTDBConfigNodeSnapshotIT.java
@@ -85,8 +85,8 @@ public class IoTDBConfigNodeSnapshotIT {
   protected static int originalRatisSnapshotTriggerThreshold;
   private static final int testRatisSnapshotTriggerThreshold = 100;
 
-  protected static long originalTimePartitionInterval;
-  private static final long testTimePartitionInterval = 86400;
+  private static final long testTimePartitionInterval =
+      ConfigFactory.getConfig().getTimePartitionInterval();
 
   @Before
   public void setUp() throws Exception {
@@ -98,9 +98,6 @@ public class IoTDBConfigNodeSnapshotIT {
         ConfigFactory.getConfig().getRatisSnapshotTriggerThreshold();
     ConfigFactory.getConfig().setRatisSnapshotTriggerThreshold(testRatisSnapshotTriggerThreshold);
 
-    originalTimePartitionInterval = ConfigFactory.getConfig().getTimePartitionInterval();
-    ConfigFactory.getConfig().setTimePartitionInterval(testTimePartitionInterval);
-
     // Init 2C2D cluster environment
     EnvFactory.getEnv().initClusterEnvironment(2, 2);
   }
@@ -113,7 +110,6 @@ public class IoTDBConfigNodeSnapshotIT {
         .setConfigNodeConsesusProtocolClass(originalConfigNodeConsensusProtocolClass);
     ConfigFactory.getConfig()
         .setRatisSnapshotTriggerThreshold(originalRatisSnapshotTriggerThreshold);
-    ConfigFactory.getConfig().setTimePartitionInterval(originalTimePartitionInterval);
   }
 
   @Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java
index 0191ed3323..1736f4b2f9 100644
--- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java
@@ -72,13 +72,11 @@ public class IoTDBClusterRestartIT {
   private static final int testConfigNodeNum = 2;
   private static final int testDataNodeNum = 2;
   private static final int testReplicationFactor = 2;
-  private static final long testTimePartitionInterval = 604800000;
   protected static String originalConfigNodeConsensusProtocolClass;
   protected static String originalSchemaRegionConsensusProtocolClass;
   protected static String originalDataRegionConsensusProtocolClass;
   protected static int originSchemaReplicationFactor;
   protected static int originalDataReplicationFactor;
-  protected static long originalTimePartitionInterval;
 
   @Before
   public void setUp() throws Exception {
@@ -98,8 +96,6 @@ public class IoTDBClusterRestartIT {
     ConfigFactory.getConfig().setSchemaReplicationFactor(testReplicationFactor);
     ConfigFactory.getConfig().setDataReplicationFactor(testReplicationFactor);
 
-    originalTimePartitionInterval = ConfigFactory.getConfig().getTimePartitionInterval();
-    ConfigFactory.getConfig().setTimePartitionInterval(testTimePartitionInterval);
     // Init 2C2D cluster environment
     EnvFactory.getEnv().initClusterEnvironment(testConfigNodeNum, testDataNodeNum);
   }
@@ -113,7 +109,6 @@ public class IoTDBClusterRestartIT {
         .setSchemaRegionConsensusProtocolClass(originalSchemaRegionConsensusProtocolClass);
     ConfigFactory.getConfig()
         .setDataRegionConsensusProtocolClass(originalDataRegionConsensusProtocolClass);
-    ConfigFactory.getConfig().setTimePartitionInterval(originalTimePartitionInterval);
   }
 
   @Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionDurableIT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionDurableIT.java
index a5da4cf85e..2d433f9990 100644
--- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionDurableIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionDurableIT.java
@@ -81,8 +81,8 @@ public class IoTDBPartitionDurableIT {
   private static int originalDataReplicationFactor;
   private static final int testReplicationFactor = 3;
 
-  private static long originalTimePartitionInterval;
-  private static final long testTimePartitionInterval = 604800000;
+  private static final long testTimePartitionInterval =
+      ConfigFactory.getConfig().getTimePartitionInterval();
 
   private static final int testDataNodeId = 0;
   private static final String sg = "root.sg";
@@ -117,9 +117,6 @@ public class IoTDBPartitionDurableIT {
     ConfigFactory.getConfig().setSchemaReplicationFactor(testReplicationFactor);
     ConfigFactory.getConfig().setDataReplicationFactor(testReplicationFactor);
 
-    originalTimePartitionInterval = ConfigFactory.getConfig().getTimePartitionInterval();
-    ConfigFactory.getConfig().setTimePartitionInterval(testTimePartitionInterval);
-
     // Init 1C3D environment
     EnvFactory.getEnv().initClusterEnvironment(1, 3);
 
@@ -148,8 +145,6 @@ public class IoTDBPartitionDurableIT {
 
     ConfigFactory.getConfig().setSchemaReplicationFactor(originalSchemaReplicationFactor);
     ConfigFactory.getConfig().setDataReplicationFactor(originalDataReplicationFactor);
-
-    ConfigFactory.getConfig().setTimePartitionInterval(originalTimePartitionInterval);
   }
 
   @Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionGetterIT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionGetterIT.java
index e8f19aed24..6a421f9f4f 100644
--- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionGetterIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionGetterIT.java
@@ -90,8 +90,8 @@ public class IoTDBPartitionGetterIT {
 
   private static int originalSeriesPartitionSlotNum;
 
-  private static long originalTimePartitionInterval;
-  private static final long testTimePartitionInterval = 604800000;
+  private static final long testTimePartitionInterval =
+      ConfigFactory.getConfig().getTimePartitionInterval();
 
   protected static int originalLeastDataRegionGroupNum;
   private static final int testLeastDataRegionGroupNum = 5;
@@ -123,9 +123,6 @@ public class IoTDBPartitionGetterIT {
     originalSeriesPartitionSlotNum = CONF.getSeriesPartitionSlotNum();
     CONF.setSeriesPartitionSlotNum(testSeriesPartitionSlotNum);
 
-    originalTimePartitionInterval = CONF.getTimePartitionInterval();
-    CONF.setTimePartitionInterval(testTimePartitionInterval);
-
     originalLeastDataRegionGroupNum = CONF.getLeastDataRegionGroupNum();
     CONF.setLeastDataRegionGroupNum(testLeastDataRegionGroupNum);
 
@@ -234,7 +231,6 @@ public class IoTDBPartitionGetterIT {
     CONF.setSchemaReplicationFactor(originalSchemaReplicationFactor);
     CONF.setDataReplicationFactor(originalDataReplicationFactor);
     CONF.setSeriesPartitionSlotNum(originalSeriesPartitionSlotNum);
-    CONF.setTimePartitionInterval(originalTimePartitionInterval);
   }
 
   @Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionInheritPolicyIT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionInheritPolicyIT.java
index f9dd8af7e9..5d39483d5d 100644
--- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionInheritPolicyIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/partition/IoTDBPartitionInheritPolicyIT.java
@@ -66,8 +66,8 @@ public class IoTDBPartitionInheritPolicyIT {
 
   private static int originalSeriesPartitionSlotNum;
 
-  private static long originalTimePartitionInterval;
-  private static final long testTimePartitionInterval = 604800000;
+  private static final long testTimePartitionInterval =
+      ConfigFactory.getConfig().getTimePartitionInterval();
 
   private static final String sg = "root.sg";
   private static final int storageGroupNum = 2;
@@ -94,9 +94,6 @@ public class IoTDBPartitionInheritPolicyIT {
     originalSeriesPartitionSlotNum = ConfigFactory.getConfig().getSeriesPartitionSlotNum();
     ConfigFactory.getConfig().setSeriesPartitionSlotNum(testSeriesPartitionSlotNum * 10);
 
-    originalTimePartitionInterval = ConfigFactory.getConfig().getTimePartitionInterval();
-    ConfigFactory.getConfig().setTimePartitionInterval(testTimePartitionInterval);
-
     // Init 1C3D environment
     EnvFactory.getEnv().initClusterEnvironment(1, 3);
 
@@ -121,7 +118,6 @@ public class IoTDBPartitionInheritPolicyIT {
         .setEnableDataPartitionInheritPolicy(originalEnableDataPartitionInheritPolicy);
     ConfigFactory.getConfig().setDataReplicationFactor(originalDataReplicationFactor);
     ConfigFactory.getConfig().setSeriesPartitionSlotNum(originalSeriesPartitionSlotNum);
-    ConfigFactory.getConfig().setTimePartitionInterval(originalTimePartitionInterval);
   }
 
   @Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IOTDBLoadTsFileIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IOTDBLoadTsFileIT.java
index 2a2639ae2c..b4e1788ebe 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IOTDBLoadTsFileIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IOTDBLoadTsFileIT.java
@@ -55,17 +55,14 @@ import java.util.Map;
 @Category({LocalStandaloneIT.class, ClusterIT.class})
 public class IOTDBLoadTsFileIT {
   private static final Logger LOGGER = LoggerFactory.getLogger(IOTDBLoadTsFileIT.class);
-  private static final long PARTITION_INTERVAL = 10 * 1000L;
-
-  private long originConfigNodePartitionInterval;
+  private static final long PARTITION_INTERVAL =
+      ConfigFactory.getConfig().getTimePartitionInterval();
 
   private File tmpDir;
 
   @Before
   public void setUp() throws Exception {
     tmpDir = new File(Files.createTempDirectory("load").toUri());
-    originConfigNodePartitionInterval = ConfigFactory.getConfig().getTimePartitionInterval();
-    ConfigFactory.getConfig().setTimePartitionInterval(PARTITION_INTERVAL);
     EnvFactory.getEnv().initBeforeTest();
   }
 
@@ -74,7 +71,6 @@ public class IOTDBLoadTsFileIT {
     deleteSG();
 
     EnvFactory.getEnv().cleanAfterTest();
-    ConfigFactory.getConfig().setTimePartitionInterval(originConfigNodePartitionInterval);
 
     if (!deleteDir()) {
       LOGGER.error("Can not delete tmp dir for loading tsfile.");
@@ -171,8 +167,8 @@ public class IOTDBLoadTsFileIT {
               SchemaConfig.MEASUREMENT_11,
               SchemaConfig.MEASUREMENT_12,
               SchemaConfig.MEASUREMENT_13));
-      generator.generateData(SchemaConfig.DEVICE_0, 100000, false);
-      generator.generateData(SchemaConfig.DEVICE_1, 100000, true);
+      generator.generateData(SchemaConfig.DEVICE_0, 100000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_1, 100000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint1 = generator.getTotalNumber();
     }
 
@@ -185,9 +181,9 @@ public class IOTDBLoadTsFileIT {
           SchemaConfig.DEVICE_3, Arrays.asList(SchemaConfig.MEASUREMENT_30));
       generator.registerAlignedTimeseries(
           SchemaConfig.DEVICE_4, Arrays.asList(SchemaConfig.MEASUREMENT_40));
-      generator.generateData(SchemaConfig.DEVICE_2, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_3, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_2, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_3, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint2 = generator.getTotalNumber();
     }
 
@@ -229,8 +225,8 @@ public class IOTDBLoadTsFileIT {
               SchemaConfig.MEASUREMENT_11,
               SchemaConfig.MEASUREMENT_12,
               SchemaConfig.MEASUREMENT_13));
-      generator.generateData(SchemaConfig.DEVICE_0, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_1, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_0, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_1, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint1 = generator.getTotalNumber();
     }
 
@@ -243,9 +239,9 @@ public class IOTDBLoadTsFileIT {
           SchemaConfig.DEVICE_3, Arrays.asList(SchemaConfig.MEASUREMENT_30));
       generator.registerAlignedTimeseries(
           SchemaConfig.DEVICE_4, Arrays.asList(SchemaConfig.MEASUREMENT_40));
-      generator.generateData(SchemaConfig.DEVICE_2, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_3, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_2, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_3, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint2 = generator.getTotalNumber();
     }
 
@@ -309,8 +305,8 @@ public class IOTDBLoadTsFileIT {
               SchemaConfig.MEASUREMENT_11,
               SchemaConfig.MEASUREMENT_12,
               SchemaConfig.MEASUREMENT_13));
-      generator.generateData(SchemaConfig.DEVICE_0, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_1, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_0, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_1, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint1 = generator.getTotalNumber();
     }
 
@@ -323,9 +319,9 @@ public class IOTDBLoadTsFileIT {
           SchemaConfig.DEVICE_3, Arrays.asList(SchemaConfig.MEASUREMENT_30));
       generator.registerAlignedTimeseries(
           SchemaConfig.DEVICE_4, Arrays.asList(SchemaConfig.MEASUREMENT_40));
-      generator.generateData(SchemaConfig.DEVICE_2, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_3, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_2, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_3, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint2 = generator.getTotalNumber();
     }
 
@@ -394,7 +390,6 @@ public class IOTDBLoadTsFileIT {
 
     File file1 = new File(tmpDir, "1-0-0-0.tsfile");
     File file2 = new File(tmpDir, "2-0-0-0.tsfile");
-    long writtenPoint1 = 0;
     // device 0, device 1, sg 0
     try (TsFileGenerator generator = new TsFileGenerator(file1)) {
       generator.registerTimeseries(
@@ -411,12 +406,10 @@ public class IOTDBLoadTsFileIT {
               SchemaConfig.MEASUREMENT_11,
               SchemaConfig.MEASUREMENT_12,
               SchemaConfig.MEASUREMENT_13));
-      generator.generateData(SchemaConfig.DEVICE_0, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_1, 10000, true);
-      writtenPoint1 = generator.getTotalNumber();
+      generator.generateData(SchemaConfig.DEVICE_0, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_1, 10000, PARTITION_INTERVAL / 10_000, true);
     }
 
-    long writtenPoint2 = 0;
     // device 2, device 3, device4, sg 1
     try (TsFileGenerator generator = new TsFileGenerator(file2)) {
       generator.registerTimeseries(
@@ -425,10 +418,9 @@ public class IOTDBLoadTsFileIT {
           SchemaConfig.DEVICE_3, Arrays.asList(SchemaConfig.MEASUREMENT_30));
       generator.registerAlignedTimeseries(
           SchemaConfig.DEVICE_4, Arrays.asList(SchemaConfig.MEASUREMENT_40));
-      generator.generateData(SchemaConfig.DEVICE_2, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_3, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 10000, true);
-      writtenPoint2 = generator.getTotalNumber();
+      generator.generateData(SchemaConfig.DEVICE_2, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_3, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 10000, PARTITION_INTERVAL / 10_000, true);
     }
 
     try (Connection connection = EnvFactory.getEnv().getConnection();
@@ -440,7 +432,7 @@ public class IOTDBLoadTsFileIT {
           statement.executeQuery(String.format("select last %s from %s", measurement, device))) {
         if (resultSet.next()) {
           String lastTime = resultSet.getString(ColumnHeaderConstant.TIME);
-          Assert.assertEquals("10000", lastTime);
+          Assert.assertEquals(String.valueOf(PARTITION_INTERVAL), lastTime);
         } else {
           Assert.fail("This ResultSet is empty.");
         }
@@ -469,8 +461,8 @@ public class IOTDBLoadTsFileIT {
               SchemaConfig.MEASUREMENT_11,
               SchemaConfig.MEASUREMENT_12,
               SchemaConfig.MEASUREMENT_13));
-      generator.generateData(SchemaConfig.DEVICE_0, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_1, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_0, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_1, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint1 = generator.getTotalNumber();
     }
 
@@ -483,9 +475,9 @@ public class IOTDBLoadTsFileIT {
           SchemaConfig.DEVICE_3, Arrays.asList(SchemaConfig.MEASUREMENT_30));
       generator.registerAlignedTimeseries(
           SchemaConfig.DEVICE_4, Arrays.asList(SchemaConfig.MEASUREMENT_40));
-      generator.generateData(SchemaConfig.DEVICE_2, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_3, 10000, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 10000, true);
+      generator.generateData(SchemaConfig.DEVICE_2, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_3, 10000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 10000, PARTITION_INTERVAL / 10_000, true);
       writtenPoint2 = generator.getTotalNumber();
     }
 
@@ -527,8 +519,8 @@ public class IOTDBLoadTsFileIT {
               SchemaConfig.MEASUREMENT_11,
               SchemaConfig.MEASUREMENT_12,
               SchemaConfig.MEASUREMENT_13));
-      generator.generateData(SchemaConfig.DEVICE_0, 100000, false);
-      generator.generateData(SchemaConfig.DEVICE_1, 100000, true);
+      generator.generateData(SchemaConfig.DEVICE_0, 100000, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_1, 100000, PARTITION_INTERVAL / 10_000, true);
       generator.generateDeletion(SchemaConfig.DEVICE_0, 10);
       generator.generateDeletion(SchemaConfig.DEVICE_1, 10);
       writtenPoint1 = generator.getTotalNumber();
@@ -544,13 +536,13 @@ public class IOTDBLoadTsFileIT {
           SchemaConfig.DEVICE_3, Arrays.asList(SchemaConfig.MEASUREMENT_30));
       generator.registerAlignedTimeseries(
           SchemaConfig.DEVICE_4, Arrays.asList(SchemaConfig.MEASUREMENT_40));
-      generator.generateData(SchemaConfig.DEVICE_2, 100, false);
-      generator.generateData(SchemaConfig.DEVICE_3, 100, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 100, true);
+      generator.generateData(SchemaConfig.DEVICE_2, 100, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_3, 100, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 100, PARTITION_INTERVAL / 10_000, true);
       generator.generateDeletion(SchemaConfig.DEVICE_2, 2);
       generator.generateDeletion(SchemaConfig.DEVICE_4, 2);
-      generator.generateData(SchemaConfig.DEVICE_2, 100, false);
-      generator.generateData(SchemaConfig.DEVICE_4, 100, true);
+      generator.generateData(SchemaConfig.DEVICE_2, 100, PARTITION_INTERVAL / 10_000, false);
+      generator.generateData(SchemaConfig.DEVICE_4, 100, PARTITION_INTERVAL / 10_000, true);
       generator.generateDeletion(SchemaConfig.DEVICE_2, 2);
       generator.generateDeletion(SchemaConfig.DEVICE_4, 2);
       writtenPoint2 = generator.getTotalNumber();
diff --git a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeInfo.java b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeInfo.java
index 4222afc753..b5332f899f 100644
--- a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeInfo.java
+++ b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeInfo.java
@@ -67,7 +67,7 @@ public class ConfigNodeInfo {
                 + PROPERTIES_FILE_NAME);
   }
 
-  /** Update ConfigNodeList both in memory and confignode-system.properties file */
+  /** Update ConfigNodeList both in memory and system.properties file */
   public void updateConfigNodeList(List<TEndPoint> latestConfigNodes) {
     // check whether the config nodes are latest or not
     configNodeInfoReadWriteLock.readLock().lock();
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
index 908d6864c1..9cc4eadad4 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
@@ -19,7 +19,6 @@
 package org.apache.iotdb.db.conf;
 
 import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
-import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
 import org.apache.iotdb.commons.conf.CommonConfig;
 import org.apache.iotdb.commons.conf.CommonDescriptor;
 import org.apache.iotdb.commons.conf.IoTDBConstant;
@@ -31,8 +30,6 @@ import org.apache.iotdb.db.conf.directories.DirectoryChecker;
 import org.apache.iotdb.db.wal.utils.WALMode;
 import org.apache.iotdb.tsfile.common.conf.TSFileConfig;
 import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
-import org.apache.iotdb.tsfile.fileSystem.FSFactoryProducer;
-import org.apache.iotdb.tsfile.fileSystem.fsFactory.FSFactory;
 
 import org.apache.commons.io.FileUtils;
 import org.slf4j.Logger;
@@ -48,6 +45,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
+import java.util.function.Supplier;
 
 public class IoTDBStartCheck {
 
@@ -56,91 +54,92 @@ public class IoTDBStartCheck {
   private static final IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
   private static final CommonConfig commonConfig = CommonDescriptor.getInstance().getConfig();
 
-  private FSFactory fsFactory = FSFactoryProducer.getFSFactory();
-
   // this file is located in data/system/schema/system.properties
   // If user delete folder "data", system.properties can reset.
   public static final String PROPERTIES_FILE_NAME = "system.properties";
   private static final String SCHEMA_DIR = config.getSchemaDir();
-  private static final String[] WAL_DIRS = commonConfig.getWalDirs();
 
-  private File propertiesFile;
-  private File tmpPropertiesFile;
+  private boolean isFirstStart = false;
+
+  private final File propertiesFile;
+  private final File tmpPropertiesFile;
 
   private Properties properties = new Properties();
 
-  private Map<String, String> systemProperties = new HashMap<>();
+  private final Map<String, Supplier<String>> systemProperties = new HashMap<>();
 
+  // region params need checking, determined when first start
   private static final String SYSTEM_PROPERTIES_STRING = "System properties:";
-
   private static final String TIMESTAMP_PRECISION_STRING = "timestamp_precision";
-  private static String timestampPrecision = config.getTimestampPrecision();
-
   private static final String PARTITION_INTERVAL_STRING = "time_partition_interval";
-  private static long timePartitionInterval = config.getTimePartitionInterval();
-
   private static final String TSFILE_FILE_SYSTEM_STRING = "tsfile_storage_fs";
-  private static String tsfileFileSystem = config.getTsFileStorageFs().toString();
-
   private static final String TAG_ATTRIBUTE_SIZE_STRING = "tag_attribute_total_size";
-  private static String tagAttributeTotalSize = String.valueOf(config.getTagAttributeTotalSize());
-
   private static final String TAG_ATTRIBUTE_FLUSH_INTERVAL = "tag_attribute_flush_interval";
-  private static String tagAttributeFlushInterval =
-      String.valueOf(config.getTagAttributeFlushInterval());
-
   private static final String MAX_DEGREE_OF_INDEX_STRING = "max_degree_of_index_node";
-  private static String maxDegreeOfIndexNode =
-      String.valueOf(TSFileDescriptor.getInstance().getConfig().getMaxDegreeOfIndexNode());
-
   private static final String DATA_REGION_NUM = "data_region_num";
-  // for upgrading from old file
-  private static final String VIRTUAL_STORAGE_GROUP_NUM = "virtual_storage_group_num";
-  private static String dataRegionNum = String.valueOf(config.getDataRegionNum());
-
   private static final String ENABLE_ID_TABLE = "enable_id_table";
-  private static String enableIDTable = String.valueOf(config.isEnableIDTable());
-
   private static final String ENABLE_ID_TABLE_LOG_FILE = "enable_id_table_log_file";
-  private static String enableIdTableLogFile = String.valueOf(config.isEnableIDTableLogFile());
-
   private static final String SCHEMA_ENGINE_MODE = "schema_engine_mode";
-  private static String schemaEngineMode = String.valueOf(config.getSchemaEngineMode());
-
   private static final String TIME_ENCODER_KEY = "time_encoder";
-  private static String timeEncoderValue =
-      String.valueOf(TSFileDescriptor.getInstance().getConfig().getTimeEncoder());
-
-  private static final String DATA_NODE_ID = "data_node_id";
-
-  private static final String SCHEMA_REGION_CONSENSUS_PROTOCOL = "schema_region_consensus_protocol";
-
-  private static final String DATA_REGION_CONSENSUS_PROTOCOL = "data_region_consensus_protocol";
-
-  private static final String IOTDB_VERSION_STRING = "iotdb_version";
 
+  private static final Map<String, Supplier<String>> constantParamValueTable = new HashMap<>();
+
+  static {
+    constantParamValueTable.put(TIMESTAMP_PRECISION_STRING, config::getTimestampPrecision);
+    constantParamValueTable.put(
+        PARTITION_INTERVAL_STRING, () -> String.valueOf(config.getTimePartitionInterval()));
+    constantParamValueTable.put(
+        TSFILE_FILE_SYSTEM_STRING, () -> config.getTsFileStorageFs().toString());
+    constantParamValueTable.put(
+        TAG_ATTRIBUTE_SIZE_STRING, () -> String.valueOf(config.getTagAttributeTotalSize()));
+    constantParamValueTable.put(
+        TAG_ATTRIBUTE_FLUSH_INTERVAL, () -> String.valueOf(config.getTagAttributeFlushInterval()));
+    constantParamValueTable.put(
+        MAX_DEGREE_OF_INDEX_STRING,
+        () -> String.valueOf(TSFileDescriptor.getInstance().getConfig().getMaxDegreeOfIndexNode()));
+    constantParamValueTable.put(DATA_REGION_NUM, () -> String.valueOf(config.getDataRegionNum()));
+    constantParamValueTable.put(ENABLE_ID_TABLE, () -> String.valueOf(config.isEnableIDTable()));
+    constantParamValueTable.put(
+        ENABLE_ID_TABLE_LOG_FILE, () -> String.valueOf(config.isEnableIDTableLogFile()));
+    constantParamValueTable.put(
+        SCHEMA_ENGINE_MODE, () -> String.valueOf(config.getSchemaEngineMode()));
+    constantParamValueTable.put(
+        TIME_ENCODER_KEY, TSFileDescriptor.getInstance().getConfig()::getTimeEncoder);
+  }
+  // endregion
+  // region params don't need checking and can be updated
   private static final String INTERNAL_ADDRESS = "dn_internal_address";
-  private static final String internalAddress = config.getInternalAddress();
-
   private static final String INTERNAL_PORT = "dn_internal_port";
-  private static final String internalPort = String.valueOf(config.getInternalPort());
-
   private static final String RPC_ADDRESS = "dn_rpc_address";
-  private static final String rpcAddress = config.getRpcAddress();
-
   private static final String RPC_PORT = "dn_rpc_port";
-  private static final String rpcPort = String.valueOf(config.getRpcPort());
-
   private static final String MPP_DATA_EXCHANGE_PORT = "dn_mpp_data_exchange_port";
-  private static final String mppDataExchangePort = String.valueOf(config.getMppDataExchangePort());
-
   private static final String SCHEMA_REGION_CONSENSUS_PORT = "dn_schema_region_consensus_port";
-  private static final String schemaRegionConsensusPort =
-      String.valueOf(config.getSchemaRegionConsensusPort());
-
   private static final String DATA_REGION_CONSENSUS_PORT = "dn_data_region_consensus_port";
-  private static final String dataRegionConsensusPort =
-      String.valueOf(config.getDataRegionConsensusPort());
+  private static final Map<String, Supplier<String>> variableParamValueTable = new HashMap<>();
+
+  static {
+    variableParamValueTable.put(
+        INTERNAL_ADDRESS, () -> String.valueOf(config.getInternalAddress()));
+    variableParamValueTable.put(INTERNAL_PORT, () -> String.valueOf(config.getInternalPort()));
+    variableParamValueTable.put(RPC_ADDRESS, () -> String.valueOf(config.getRpcAddress()));
+    variableParamValueTable.put(RPC_PORT, () -> String.valueOf(config.getRpcPort()));
+    variableParamValueTable.put(
+        MPP_DATA_EXCHANGE_PORT, () -> String.valueOf(config.getMppDataExchangePort()));
+    variableParamValueTable.put(
+        SCHEMA_REGION_CONSENSUS_PORT, () -> String.valueOf(config.getSchemaRegionConsensusPort()));
+    variableParamValueTable.put(
+        DATA_REGION_CONSENSUS_PORT, () -> String.valueOf(config.getDataRegionConsensusPort()));
+  }
+  // endregion
+  // region params don't need checking, determined by the system
+  private static final String IOTDB_VERSION_STRING = "iotdb_version";
+  private static final String DATA_NODE_ID = "data_node_id";
+  private static final String SCHEMA_REGION_CONSENSUS_PROTOCOL = "schema_region_consensus_protocol";
+  private static final String DATA_REGION_CONSENSUS_PROTOCOL = "data_region_consensus_protocol";
+  // endregion
+  // region params of old versions
+  private static final String VIRTUAL_STORAGE_GROUP_NUM = "virtual_storage_group_num";
+  // endregion
 
   public static IoTDBStartCheck getInstance() {
     return IoTDBConfigCheckHolder.INSTANCE;
@@ -151,6 +150,16 @@ public class IoTDBStartCheck {
     private static final IoTDBStartCheck INSTANCE = new IoTDBStartCheck();
   }
 
+  private String getVal(String paramName) {
+    if (constantParamValueTable.containsKey(paramName)) {
+      return constantParamValueTable.get(paramName).get();
+    } else if (variableParamValueTable.containsKey(paramName)) {
+      return variableParamValueTable.get(paramName).get();
+    } else {
+      return null;
+    }
+  }
+
   private IoTDBStartCheck() {
     logger.info("Starting IoTDB " + IoTDBConstant.VERSION_WITH_BUILD);
 
@@ -165,7 +174,15 @@ public class IoTDBStartCheck {
       }
     }
 
-    // check time stamp precision
+    propertiesFile =
+        SystemFileFactory.INSTANCE.getFile(
+            IoTDBStartCheck.SCHEMA_DIR + File.separator + PROPERTIES_FILE_NAME);
+    tmpPropertiesFile =
+        SystemFileFactory.INSTANCE.getFile(
+            IoTDBStartCheck.SCHEMA_DIR + File.separator + PROPERTIES_FILE_NAME + ".tmp");
+
+    // Check time stamp precision
+    String timestampPrecision = getVal(TIMESTAMP_PRECISION_STRING);
     if (!("ms".equals(timestampPrecision)
         || "us".equals(timestampPrecision)
         || "ns".equals(timestampPrecision))) {
@@ -176,25 +193,55 @@ public class IoTDBStartCheck {
       System.exit(-1);
     }
 
-    systemProperties.put(IOTDB_VERSION_STRING, IoTDBConstant.VERSION);
-    systemProperties.put(TIMESTAMP_PRECISION_STRING, timestampPrecision);
-    systemProperties.put(PARTITION_INTERVAL_STRING, String.valueOf(timePartitionInterval));
-    systemProperties.put(TSFILE_FILE_SYSTEM_STRING, tsfileFileSystem);
-    systemProperties.put(TAG_ATTRIBUTE_SIZE_STRING, tagAttributeTotalSize);
-    systemProperties.put(TAG_ATTRIBUTE_FLUSH_INTERVAL, tagAttributeFlushInterval);
-    systemProperties.put(MAX_DEGREE_OF_INDEX_STRING, maxDegreeOfIndexNode);
-    systemProperties.put(DATA_REGION_NUM, dataRegionNum);
-    systemProperties.put(TIME_ENCODER_KEY, timeEncoderValue);
-    systemProperties.put(ENABLE_ID_TABLE, enableIDTable);
-    systemProperties.put(ENABLE_ID_TABLE_LOG_FILE, enableIdTableLogFile);
-    systemProperties.put(SCHEMA_ENGINE_MODE, schemaEngineMode);
-    systemProperties.put(INTERNAL_ADDRESS, internalAddress);
-    systemProperties.put(INTERNAL_PORT, internalPort);
-    systemProperties.put(RPC_ADDRESS, rpcAddress);
-    systemProperties.put(RPC_PORT, rpcPort);
-    systemProperties.put(MPP_DATA_EXCHANGE_PORT, mppDataExchangePort);
-    systemProperties.put(SCHEMA_REGION_CONSENSUS_PORT, schemaRegionConsensusPort);
-    systemProperties.put(DATA_REGION_CONSENSUS_PORT, dataRegionConsensusPort);
+    // check partition interval
+    if (Long.parseLong(getVal(PARTITION_INTERVAL_STRING)) <= 0) {
+      logger.error("Time partition interval must larger than 0!");
+      System.exit(-1);
+    }
+
+    systemProperties.put(IOTDB_VERSION_STRING, () -> IoTDBConstant.VERSION);
+    for (String param : constantParamValueTable.keySet()) {
+      systemProperties.put(param, () -> getVal(param));
+    }
+    for (String param : variableParamValueTable.keySet()) {
+      systemProperties.put(param, () -> getVal(param));
+    }
+  }
+
+  /** check configuration in system.properties when starting IoTDB */
+  public boolean checkIsFirstStart() throws IOException {
+    // system init first time, no need to check, write system.properties and return
+    if (!propertiesFile.exists() && !tmpPropertiesFile.exists()) {
+      // create system.properties
+      if (propertiesFile.createNewFile()) {
+        logger.info(" {} has been created.", propertiesFile.getAbsolutePath());
+      } else {
+        logger.error("can not create {}", propertiesFile.getAbsolutePath());
+        System.exit(-1);
+      }
+
+      // write properties to system.properties
+      try (FileOutputStream outputStream = new FileOutputStream(propertiesFile)) {
+        systemProperties.forEach((k, v) -> properties.setProperty(k, v.get()));
+        properties.store(outputStream, SYSTEM_PROPERTIES_STRING);
+      }
+      isFirstStart = true;
+      return true;
+    }
+
+    if (!propertiesFile.exists() && tmpPropertiesFile.exists()) {
+      // rename tmp file to system.properties, no need to check
+      FileUtils.moveFile(tmpPropertiesFile, propertiesFile);
+      logger.info("rename {} to {}", tmpPropertiesFile, propertiesFile);
+      isFirstStart = false;
+      return false;
+    } else if (propertiesFile.exists() && tmpPropertiesFile.exists()) {
+      // both files exist, remove tmp file
+      FileUtils.forceDelete(tmpPropertiesFile);
+      logger.info("remove {}", tmpPropertiesFile);
+    }
+    isFirstStart = false;
+    return false;
   }
 
   /**
@@ -205,7 +252,6 @@ public class IoTDBStartCheck {
    * accessing same director.
    */
   public void checkDirectory() throws ConfigurationException, IOException {
-
     // check data dirs
     for (String dataDir : config.getDataDirs()) {
       DirectoryChecker.getInstance().registerDirectory(new File(dataDir));
@@ -244,69 +290,42 @@ public class IoTDBStartCheck {
    * system.properties (3) rename system.properties.tmp to system.properties
    */
   public void checkSystemConfig() throws ConfigurationException, IOException {
-    propertiesFile =
-        SystemFileFactory.INSTANCE.getFile(
-            IoTDBStartCheck.SCHEMA_DIR + File.separator + PROPERTIES_FILE_NAME);
-    tmpPropertiesFile =
-        SystemFileFactory.INSTANCE.getFile(
-            IoTDBStartCheck.SCHEMA_DIR + File.separator + PROPERTIES_FILE_NAME + ".tmp");
-
-    // system init first time, no need to check, write system.properties and return
-    if (!propertiesFile.exists() && !tmpPropertiesFile.exists()) {
-      // create system.properties
-      if (propertiesFile.createNewFile()) {
-        logger.info(" {} has been created.", propertiesFile.getAbsolutePath());
-      } else {
-        logger.error("can not create {}", propertiesFile.getAbsolutePath());
-        System.exit(-1);
-      }
-
-      // write properties to system.properties
-      try (FileOutputStream outputStream = new FileOutputStream(propertiesFile)) {
-        systemProperties.forEach((k, v) -> properties.setProperty(k, v));
-        properties.store(outputStream, SYSTEM_PROPERTIES_STRING);
-      }
-      return;
-    }
-
-    if (!propertiesFile.exists() && tmpPropertiesFile.exists()) {
-      // rename tmp file to system.properties, no need to check
-      FileUtils.moveFile(tmpPropertiesFile, propertiesFile);
-      logger.info("rename {} to {}", tmpPropertiesFile, propertiesFile);
-      return;
-    } else if (propertiesFile.exists() && tmpPropertiesFile.exists()) {
-      // both files exist, remove tmp file
-      FileUtils.forceDelete(tmpPropertiesFile);
-      logger.info("remove {}", tmpPropertiesFile);
-    }
-
-    // no tmp file, read properties from system.properties
+    // read properties from system.properties
     try (FileInputStream inputStream = new FileInputStream(propertiesFile);
         InputStreamReader inputStreamReader =
             new InputStreamReader(inputStream, TSFileConfig.STRING_CHARSET)) {
       properties.load(inputStreamReader);
     }
-    // check whether upgrading from <=v0.9
-    if (!properties.containsKey(IOTDB_VERSION_STRING)) {
-      logger.error(
-          "DO NOT UPGRADE IoTDB from v0.9 or lower version to v0.12!"
-              + " Please upgrade to v0.10 first");
-      System.exit(-1);
-    }
-    // check whether upgrading from [v0.10, v.12]
-    String versionString = properties.getProperty(IOTDB_VERSION_STRING);
-    if (versionString.startsWith("0.10") || versionString.startsWith("0.11")) {
-      logger.error("IoTDB version is too old, please upgrade to 0.12 firstly.");
-      System.exit(-1);
-    } else if (versionString.startsWith("0.12") || versionString.startsWith("0.13")) {
-      checkWALNotExists();
-      upgradePropertiesFile();
+
+    if (isFirstStart) {
+      // overwrite system.properties when first start
+      try (FileOutputStream outputStream = new FileOutputStream(propertiesFile)) {
+        systemProperties.forEach((k, v) -> properties.setProperty(k, v.get()));
+        properties.store(outputStream, SYSTEM_PROPERTIES_STRING);
+      }
+    } else {
+      // check whether upgrading from <=v0.9
+      if (!properties.containsKey(IOTDB_VERSION_STRING)) {
+        logger.error(
+            "DO NOT UPGRADE IoTDB from v0.9 or lower version to v1.0!"
+                + " Please upgrade to v0.10 first");
+        System.exit(-1);
+      }
+      // check whether upgrading from [v0.10, v.13]
+      String versionString = properties.getProperty(IOTDB_VERSION_STRING);
+      if (versionString.startsWith("0.10") || versionString.startsWith("0.11")) {
+        logger.error("IoTDB version is too old, please upgrade to 0.12 firstly.");
+        System.exit(-1);
+      } else if (versionString.startsWith("0.12") || versionString.startsWith("0.13")) {
+        checkWALNotExists();
+        upgradePropertiesFile();
+      }
+      checkProperties();
     }
-    checkProperties();
   }
 
   private void checkWALNotExists() {
-    for (String walDir : WAL_DIRS) {
+    for (String walDir : commonConfig.getWalDirs()) {
       if (SystemFileFactory.INSTANCE.getFile(walDir).isDirectory()) {
         File[] sgWALs = SystemFileFactory.INSTANCE.getFile(walDir).listFiles();
         if (sgWALs != null) {
@@ -339,7 +358,7 @@ public class IoTDBStartCheck {
       systemProperties.forEach(
           (k, v) -> {
             if (!properties.containsKey(k)) {
-              properties.setProperty(k, v);
+              properties.setProperty(k, v.get());
             }
           });
       properties.setProperty(IOTDB_VERSION_STRING, IoTDBConstant.VERSION);
@@ -371,7 +390,7 @@ public class IoTDBStartCheck {
       systemProperties.forEach(
           (k, v) -> {
             if (!properties.containsKey(k)) {
-              properties.setProperty(k, v);
+              properties.setProperty(k, v.get());
             }
           });
       properties.setProperty(IOTDB_VERSION_STRING, IoTDBConstant.VERSION);
@@ -387,51 +406,17 @@ public class IoTDBStartCheck {
 
   /** Check all immutable properties */
   private void checkProperties() throws ConfigurationException, IOException {
-    for (Entry<String, String> entry : systemProperties.entrySet()) {
+    for (Entry<String, Supplier<String>> entry : systemProperties.entrySet()) {
       if (!properties.containsKey(entry.getKey())) {
         upgradePropertiesFileFromBrokenFile();
         logger.info("repair system.properties, lack {}", entry.getKey());
       }
     }
 
-    if (!properties.getProperty(TIMESTAMP_PRECISION_STRING).equals(timestampPrecision)) {
-      throwException(TIMESTAMP_PRECISION_STRING, timestampPrecision);
-    }
-
-    if (!(properties.getProperty(TSFILE_FILE_SYSTEM_STRING).equals(tsfileFileSystem))) {
-      throwException(TSFILE_FILE_SYSTEM_STRING, tsfileFileSystem);
-    }
-
-    if (!(properties.getProperty(TAG_ATTRIBUTE_SIZE_STRING).equals(tagAttributeTotalSize))) {
-      throwException(TAG_ATTRIBUTE_SIZE_STRING, tagAttributeTotalSize);
-    }
-
-    if (!(properties.getProperty(TAG_ATTRIBUTE_FLUSH_INTERVAL).equals(tagAttributeFlushInterval))) {
-      throwException(TAG_ATTRIBUTE_FLUSH_INTERVAL, tagAttributeFlushInterval);
-    }
-
-    if (!(properties.getProperty(MAX_DEGREE_OF_INDEX_STRING).equals(maxDegreeOfIndexNode))) {
-      throwException(MAX_DEGREE_OF_INDEX_STRING, maxDegreeOfIndexNode);
-    }
-
-    if (!(properties.getProperty(DATA_REGION_NUM).equals(dataRegionNum))) {
-      throwException(DATA_REGION_NUM, dataRegionNum);
-    }
-
-    if (!(properties.getProperty(TIME_ENCODER_KEY).equals(timeEncoderValue))) {
-      throwException(TIME_ENCODER_KEY, timeEncoderValue);
-    }
-
-    if (!(properties.getProperty(ENABLE_ID_TABLE).equals(enableIDTable))) {
-      throwException(ENABLE_ID_TABLE, enableIDTable);
-    }
-
-    if (!(properties.getProperty(ENABLE_ID_TABLE_LOG_FILE).equals(enableIdTableLogFile))) {
-      throwException(ENABLE_ID_TABLE_LOG_FILE, enableIdTableLogFile);
-    }
-
-    if (!(properties.getProperty(SCHEMA_ENGINE_MODE).equals(schemaEngineMode))) {
-      throwException(SCHEMA_ENGINE_MODE, schemaEngineMode);
+    for (String param : constantParamValueTable.keySet()) {
+      if (!(properties.getProperty(param).equals(getVal(param)))) {
+        throwException(param, getVal(param));
+      }
     }
 
     // load configuration from system properties only when start as Data node
@@ -493,35 +478,6 @@ public class IoTDBStartCheck {
     FileUtils.moveFile(tmpPropertiesFile, propertiesFile);
   }
 
-  /** call this method to serialize consensus protocol */
-  public void serializeConsensusProtocol(String regionConsensusProtocol, TConsensusGroupType type)
-      throws IOException {
-    // create an empty tmpPropertiesFile
-    if (tmpPropertiesFile.createNewFile()) {
-      logger.info("Create system.properties.tmp {}.", tmpPropertiesFile);
-    } else {
-      logger.error("Create system.properties.tmp {} failed.", tmpPropertiesFile);
-      System.exit(-1);
-    }
-
-    reloadProperties();
-
-    try (FileOutputStream tmpFOS = new FileOutputStream(tmpPropertiesFile.toString())) {
-      if (type == TConsensusGroupType.DataRegion) {
-        properties.setProperty(DATA_REGION_CONSENSUS_PROTOCOL, regionConsensusProtocol);
-      } else if (type == TConsensusGroupType.SchemaRegion) {
-        properties.setProperty(SCHEMA_REGION_CONSENSUS_PROTOCOL, regionConsensusProtocol);
-      }
-      properties.store(tmpFOS, SYSTEM_PROPERTIES_STRING);
-      // serialize finished, delete old system.properties file
-      if (propertiesFile.exists()) {
-        Files.delete(propertiesFile.toPath());
-      }
-    }
-    // rename system.properties.tmp to system.properties
-    FileUtils.moveFile(tmpPropertiesFile, propertiesFile);
-  }
-
   public void serializeGlobalConfig(TGlobalConfig globalConfig) throws IOException {
     // create an empty tmpPropertiesFile
     if (tmpPropertiesFile.createNewFile()) {
@@ -553,30 +509,6 @@ public class IoTDBStartCheck {
     FileUtils.moveFile(tmpPropertiesFile, propertiesFile);
   }
 
-  public void serializeNewDataNode(TDataNodeLocation dataNodeLocation) throws IOException {
-    reloadProperties();
-
-    try (FileOutputStream fileOutputStream = new FileOutputStream(propertiesFile)) {
-      properties.setProperty(INTERNAL_ADDRESS, dataNodeLocation.getInternalEndPoint().getIp());
-      properties.setProperty(
-          INTERNAL_PORT, String.valueOf(dataNodeLocation.getInternalEndPoint().getPort()));
-      properties.setProperty(
-          RPC_ADDRESS, String.valueOf(dataNodeLocation.getClientRpcEndPoint().getIp()));
-      properties.setProperty(
-          RPC_PORT, String.valueOf(dataNodeLocation.getClientRpcEndPoint().getPort()));
-      properties.setProperty(
-          MPP_DATA_EXCHANGE_PORT,
-          String.valueOf(dataNodeLocation.getMPPDataExchangeEndPoint().getPort()));
-      properties.setProperty(
-          SCHEMA_REGION_CONSENSUS_PORT,
-          String.valueOf(dataNodeLocation.getSchemaRegionConsensusEndPoint().getPort()));
-      properties.setProperty(
-          DATA_REGION_CONSENSUS_PORT,
-          String.valueOf(dataNodeLocation.getDataRegionConsensusEndPoint().getPort()));
-      properties.store(fileOutputStream, SYSTEM_PROPERTIES_STRING);
-    }
-  }
-
   public boolean checkConsensusProtocolExists(TConsensusGroupType type) {
     if (type == TConsensusGroupType.DataRegion) {
       return properties.containsKey(DATA_REGION_CONSENSUS_PROTOCOL);
@@ -587,50 +519,4 @@ public class IoTDBStartCheck {
     logger.error("Unexpected consensus group type");
     return false;
   }
-
-  public boolean isIpPortUpdated() {
-    boolean isUpdated = false;
-    // check the modifiable parts of configuration
-    if (!(properties.getProperty(INTERNAL_PORT).equals(internalPort))) {
-      isUpdated = true;
-      logger.info(
-          "Internal port is updated from {} to {}",
-          properties.getProperty(INTERNAL_PORT),
-          internalPort);
-    }
-    if (!(properties.getProperty(RPC_ADDRESS).equals(rpcAddress))) {
-      isUpdated = true;
-      logger.info(
-          "RPC address is updated from {} to {}", properties.getProperty(RPC_ADDRESS), rpcAddress);
-    }
-    if (!(properties.getProperty(RPC_PORT).equals(rpcPort))) {
-      isUpdated = true;
-      logger.info("RPC port is updated from {} to {}", properties.getProperty(RPC_PORT), rpcPort);
-    }
-    if (!(properties.getProperty(MPP_DATA_EXCHANGE_PORT).equals(mppDataExchangePort))) {
-      isUpdated = true;
-      logger.info(
-          "MPP data exchange port is updated from {} to {}",
-          properties.getProperty(MPP_DATA_EXCHANGE_PORT),
-          mppDataExchangePort);
-    }
-    return isUpdated;
-  }
-
-  public boolean checkNonModifiableConfiguration() {
-    // check the non-modifiable parts of configuration
-    if (!(properties.getProperty(INTERNAL_ADDRESS).equals(internalAddress))) {
-      logger.error("Internal address is not allowed to be updated");
-      return true;
-    }
-    if (!(properties.getProperty(SCHEMA_REGION_CONSENSUS_PORT).equals(schemaRegionConsensusPort))) {
-      logger.error("Schema region consensus port is not allowed to be updated");
-      return true;
-    }
-    if (!(properties.getProperty(DATA_REGION_CONSENSUS_PORT).equals(dataRegionConsensusPort))) {
-      logger.error("Data region consensus port is not allowed to be updated");
-      return true;
-    }
-    return false;
-  }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
index 823201affe..93c70500f8 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -193,7 +193,7 @@ public class DataNode implements DataNodeMBean {
     config.setClusterMode(true);
 
     // Notice: Consider this DataNode as first start if the system.properties file doesn't exist
-    boolean isFirstStart = !SYSTEM_PROPERTIES.exists();
+    boolean isFirstStart = IoTDBStartCheck.getInstance().checkIsFirstStart();
 
     // Check target ConfigNodes
     for (TEndPoint endPoint : config.getTargetConfigNodeList()) {
@@ -211,9 +211,6 @@ public class DataNode implements DataNodeMBean {
     StartupChecks checks = new StartupChecks(IoTDBConstant.DN_ROLE).withDefaultTest();
     checks.verify();
 
-    // Check system configurations
-    IoTDBStartCheck.getInstance().checkSystemConfig();
-
     return isFirstStart;
   }
 
@@ -285,6 +282,7 @@ public class DataNode implements DataNodeMBean {
 
     /* Check system configurations */
     try {
+      IoTDBStartCheck.getInstance().checkSystemConfig();
       IoTDBStartCheck.getInstance().checkDirectory();
       IoTDBStartCheck.getInstance().serializeGlobalConfig(configurationResp.globalConfig);
       IoTDBDescriptor.getInstance().initClusterSchemaMemoryAllocate();