Skip to content

Commit

Permalink
IoTConsensusV2: Fix up iotv2 wal check (#14280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pengzna authored Dec 3, 2024
1 parent 2b4ab69 commit a409dab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void checkGlobalConfig() throws ConfigurationException {
String.valueOf(CONF.getSchemaRegionConsensusProtocolClass()),
String.format(
"%s or %s", ConsensusFactory.SIMPLE_CONSENSUS, ConsensusFactory.RATIS_CONSENSUS),
"the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.FastIoTConsensus");
"the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.IoTConsensusV2");
}

// The leader distribution policy is limited
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,15 @@ public void checkSystemConfig() throws ConfigurationException, IOException {

if (systemPropertiesHandler.isFirstStart()) {
if ((config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.IOT_CONSENSUS)
|| config
.getDataRegionConsensusProtocolClass()
.equals(ConsensusFactory.IOT_CONSENSUS_V2))
|| (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");
"Configuring the WALMode as disable is not supported under IoTConsensus and IoTConsensusV2 stream mode");
}
} else {
// check whether upgrading from <=v0.9
Expand Down

0 comments on commit a409dab

Please sign in to comment.