133tosakarin commented on code in PR #13178:
URL: https://github.com/apache/iotdb/pull/13178#discussion_r1718100475
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java:
##########
@@ -578,15 +597,26 @@ public void resetPeerList(ConsensusGroupId groupId,
List<Peer> peers) throws Con
@Override
public void transferLeader(ConsensusGroupId groupId, Peer newLeader) throws
ConsensusException {
// first fetch the newest information
+ logger.info("transfer consensusGroup {} leader to {}", groupId, newLeader);
final RaftGroupId raftGroupId =
Utils.fromConsensusGroupIdToRaftGroupId(groupId);
final RaftGroup raftGroup =
Optional.ofNullable(getGroupInfo(raftGroupId))
.orElseThrow(() -> new ConsensusGroupNotExistException(groupId));
-
+ if (raftGroup.getPeers() == null) {
Review Comment:
This commit is draft version, I'll delete these code in future commit
--
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]