BUAAserein commented on code in PR #12206: URL: https://github.com/apache/iotdb/pull/12206#discussion_r1539141497
########## iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java: ########## @@ -392,6 +402,30 @@ public List<ConsensusGroupId> getAllConsensusGroupIds() { return new ArrayList<>(stateMachineMap.keySet()); } + public void resetPeerList(ConsensusGroupId groupId, List<Peer> peers) throws ConsensusException { + IoTConsensusServerImpl impl = + Optional.ofNullable(stateMachineMap.get(groupId)) + .orElseThrow(() -> new ConsensusGroupNotExistException(groupId)); + if (impl.isReadOnly()) { + throw new ConsensusException("system is in read-only status now"); + } else if (!impl.isActive()) { + throw new ConsensusException( + "peer is inactive and not ready to receive reset configuration request."); + } else { Review Comment: fixed -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org