OneSizeFitsQuorum commented on code in PR #12355:
URL: https://github.com/apache/iotdb/pull/12355#discussion_r1620726318
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/consensuspipe/ConsensusPipeDispatcher.java:
##########
@@ -33,5 +33,7 @@ void createPipe(
void stopPipe(String pipeName) throws Exception;
- void dropPipe(String pipeName) throws Exception;
+ // Use ConsensusPipeName instead of String to provide information for
receiverAgent to release
Review Comment:
use /** */
##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties:
##########
@@ -138,6 +139,12 @@ data_replication_factor=1
# Datatype: Boolean
# enable_auto_leader_balance_for_iot_consensus=true
+# Whether to enable auto leader balance for FastIoTConsensus protocol.
+# The ConfigNode-leader will balance the leader of
FastIoTConsensus-RegionGroups by leader_distribution_policy if set true.
+# Notice: Default is true because the FastIoTConsensus depends on this
function to distribute leader.
+# Datatype: Boolean
+# enable_auto_leader_balance_for_fast_iot_consensus=true
Review Comment:
It seems that the enable_auto_leader_balance_for_iot_consensus value can be
used for both new consensus protocols, so we will not add this configuration
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RouteBalancer.java:
##########
@@ -80,13 +80,17 @@ public class RouteBalancer implements
IClusterStatusSubscriber {
&&
ConsensusFactory.RATIS_CONSENSUS.equals(DATA_REGION_CONSENSUS_PROTOCOL_CLASS))
|| (CONF.isEnableAutoLeaderBalanceForIoTConsensus()
&&
ConsensusFactory.IOT_CONSENSUS.equals(DATA_REGION_CONSENSUS_PROTOCOL_CLASS))
+ || (CONF.isEnableAutoLeaderBalanceForFastIoTConsensus()
+ &&
ConsensusFactory.FAST_IOT_CONSENSUS.equals(DATA_REGION_CONSENSUS_PROTOCOL_CLASS))
// The simple consensus protocol will always automatically designate
itself as the leader
||
ConsensusFactory.SIMPLE_CONSENSUS.equals(DATA_REGION_CONSENSUS_PROTOCOL_CLASS);
private static final boolean IS_ENABLE_AUTO_LEADER_BALANCE_FOR_SCHEMA_REGION
=
(CONF.isEnableAutoLeaderBalanceForRatisConsensus()
&&
ConsensusFactory.RATIS_CONSENSUS.equals(SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS))
|| (CONF.isEnableAutoLeaderBalanceForIoTConsensus()
&&
ConsensusFactory.IOT_CONSENSUS.equals(SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS))
+ || (CONF.isEnableAutoLeaderBalanceForFastIoTConsensus()
Review Comment:
do not need this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]