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

tanxinyu pushed a commit to branch jira5389
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit e59db0ef933fa09f58a4ad0faee15cd964264768
Author: OneSizeFitQuorum <[email protected]>
AuthorDate: Mon Jan 9 19:15:11 2023 +0800

    finish
    
    Signed-off-by: OneSizeFitQuorum <[email protected]>
---
 .../src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java   | 8 ++++++++
 1 file changed, 8 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 bc0bd52949..50e4a85044 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
@@ -107,6 +107,7 @@ public class IoTDBStartCheck {
     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";
@@ -131,6 +132,7 @@ public class IoTDBStartCheck {
     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";
@@ -304,6 +306,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)) {

Reply via email to