Skip to content

Commit a409dab

Browse files
authored
IoTConsensusV2: Fix up iotv2 wal check (apache#14280)
1 parent 2b4ab69 commit a409dab

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private void checkGlobalConfig() throws ConfigurationException {
153153
String.valueOf(CONF.getSchemaRegionConsensusProtocolClass()),
154154
String.format(
155155
"%s or %s", ConsensusFactory.SIMPLE_CONSENSUS, ConsensusFactory.RATIS_CONSENSUS),
156-
"the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.FastIoTConsensus");
156+
"the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.IoTConsensusV2");
157157
}
158158

159159
// The leader distribution policy is limited

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,15 @@ public void checkSystemConfig() throws ConfigurationException, IOException {
218218

219219
if (systemPropertiesHandler.isFirstStart()) {
220220
if ((config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.IOT_CONSENSUS)
221-
|| config
222-
.getDataRegionConsensusProtocolClass()
223-
.equals(ConsensusFactory.IOT_CONSENSUS_V2))
221+
|| (config
222+
.getDataRegionConsensusProtocolClass()
223+
.equals(ConsensusFactory.IOT_CONSENSUS_V2)
224+
&& config
225+
.getIotConsensusV2Mode()
226+
.equals(ConsensusFactory.IOT_CONSENSUS_V2_STREAM_MODE)))
224227
&& config.getWalMode().equals(WALMode.DISABLE)) {
225228
throw new ConfigurationException(
226-
"Configuring the WALMode as disable is not supported under IoTConsensus");
229+
"Configuring the WALMode as disable is not supported under IoTConsensus and IoTConsensusV2 stream mode");
227230
}
228231
} else {
229232
// check whether upgrading from <=v0.9

0 commit comments

Comments
 (0)