提交 7c867432 编写于 作者: T Tian Jiang

fix configuration

上级 1dcf0b07
...@@ -74,6 +74,7 @@ public class RegionRouteCache { ...@@ -74,6 +74,7 @@ public class RegionRouteCache {
switch (consensusProtocolClass) { switch (consensusProtocolClass) {
case ConsensusFactory.SIMPLE_CONSENSUS: case ConsensusFactory.SIMPLE_CONSENSUS:
case ConsensusFactory.RATIS_CONSENSUS: case ConsensusFactory.RATIS_CONSENSUS:
case ConsensusFactory.RAFT_CONSENSUS:
// The leader of simple and ratis consensus is self-elected // The leader of simple and ratis consensus is self-elected
if (leaderSample.getLeft() > this.leaderSample.get().getLeft()) { if (leaderSample.getLeft() > this.leaderSample.get().getLeft()) {
this.leaderSample.set(leaderSample); this.leaderSample.set(leaderSample);
...@@ -95,6 +96,7 @@ public class RegionRouteCache { ...@@ -95,6 +96,7 @@ public class RegionRouteCache {
switch (consensusProtocolClass) { switch (consensusProtocolClass) {
case ConsensusFactory.SIMPLE_CONSENSUS: case ConsensusFactory.SIMPLE_CONSENSUS:
case ConsensusFactory.RATIS_CONSENSUS: case ConsensusFactory.RATIS_CONSENSUS:
case ConsensusFactory.RAFT_CONSENSUS:
// The leader of simple and ratis consensus is self-elected // The leader of simple and ratis consensus is self-elected
if (leaderSample.get().getRight() != leaderId.get()) { if (leaderSample.get().getRight() != leaderId.get()) {
leaderId.set(leaderSample.get().getRight()); leaderId.set(leaderSample.get().getRight());
......
...@@ -1061,6 +1061,7 @@ public class IoTDBDescriptor { ...@@ -1061,6 +1061,7 @@ public class IoTDBDescriptor {
"datanode_schema_cache_eviction_policy", conf.getDataNodeSchemaCacheEvictionPolicy())); "datanode_schema_cache_eviction_policy", conf.getDataNodeSchemaCacheEvictionPolicy()));
loadIoTConsensusProps(properties); loadIoTConsensusProps(properties);
conf.setCustomizedProperties(properties);
} }
private void loadIoTConsensusProps(Properties properties) { private void loadIoTConsensusProps(Properties properties) {
......
...@@ -183,6 +183,7 @@ public class DataRegionConsensusImpl { ...@@ -183,6 +183,7 @@ public class DataRegionConsensusImpl {
CONF.getConnectionTimeoutInMS(), TimeUnit.MILLISECONDS)) CONF.getConnectionTimeoutInMS(), TimeUnit.MILLISECONDS))
.build()) .build())
.build()) .build())
.setProperties(CONF.getCustomizedProperties())
.build(), .build(),
DataRegionConsensusImplHolder::createDataRegionStateMachine) DataRegionConsensusImplHolder::createDataRegionStateMachine)
.orElseThrow( .orElseThrow(
......
...@@ -141,6 +141,7 @@ public class SchemaRegionConsensusImpl { ...@@ -141,6 +141,7 @@ public class SchemaRegionConsensusImpl {
.build()) .build())
.build()) .build())
.setStorageDir(CONF.getSchemaRegionConsensusDir()) .setStorageDir(CONF.getSchemaRegionConsensusDir())
.setProperties(CONF.getCustomizedProperties())
.build(), .build(),
gid -> gid ->
new SchemaRegionStateMachine( new SchemaRegionStateMachine(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册