OneSizeFitsQuorum commented on code in PR #12463:
URL: https://github.com/apache/iotdb/pull/12463#discussion_r1604251595
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java:
##########
@@ -2154,10 +2155,21 @@ private TSStatus createNewRegionPeer(ConsensusGroupId
regionId, List<Peer> peers
regionId);
TSStatus status = new
TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
try {
+
if (regionId instanceof DataRegionId) {
- DataRegionConsensusImpl.getInstance().createLocalPeer(regionId, peers);
+ // RatisConsensus requires an empty peer list during region transition
+ final List<Peer> createPeers =
+ DataRegionConsensusImpl.getInstance() instanceof RatisConsensus
Review Comment:
use config to judge
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java:
##########
@@ -107,7 +107,7 @@
import java.util.stream.Collectors;
/** A multi-raft consensus implementation based on Apache Ratis. */
-class RatisConsensus implements IConsensus {
+public class RatisConsensus implements IConsensus {
Review Comment:
do not modify 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]