public void checkSystemConfig() throws ConfigurationException, IOException {
    // read properties from system.properties
    properties = systemPropertiesHandler.read();

    if (systemPropertiesHandler.isFirstStart()) {
      if ((config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.IOT_CONSENSUS)
              || (config
                      .getDataRegionConsensusProtocolClass()
                      .equals(ConsensusFactory.IOT_CONSENSUS_V2)
                  && config
                      .getIotConsensusV2Mode()
                      .equals(ConsensusFactory.IOT_CONSENSUS_V2_STREAM_MODE)))
          && config.getWalMode().equals(WALMode.DISABLE)) {
        throw new ConfigurationException(
            "Configuring the WALMode as disable is not supported under IoTConsensus and IoTConsensusV2 stream mode");
      }
    } 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);
      }
      String versionString = properties.getProperty(IOTDB_VERSION_STRING);
      if (versionString.startsWith("0.")) {
        logger.error("IoTDB version is too old");
        System.exit(-1);
      }
      checkImmutableSystemProperties();
    }
  }
check configuration in system.properties when starting IoTDB

<p>When init: create system.properties directly

<p>When upgrading the system.properties: (1) create system.properties.tmp (2) delete
system.properties (3) rename system.properties.tmp to system.properties
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java