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:17 UTC

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

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)) {