Caideyipi commented on code in PR #19268:
URL: https://github.com/apache/iotdb/pull/19268#discussion_r4581476971
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java:
##########
@@ -471,6 +471,7 @@ public void addRemotePeer(ConsensusGroupId groupId, Peer
peer) throws ConsensusE
// step 6: active new Peer
logger.info(IoTConsensusMessages.ACTIVATE_NEW_PEER);
impl.activePeer(peer);
+ impl.waitNewPeerUntilSyncLogCompleted(peer);
Review Comment:
After `activePeer(peer)` succeeds, this wait can now throw on a timeout or a
WAL gap. The catch block below only calls
`notifyPeersToRemoveSyncLogChannel(peer)`, which removes the outbound channels
but does not inactivate the destination. A failed add can therefore leave the
replacement active with only the snapshot and a partial incremental replay.
Please roll the destination back to inactive, or otherwise remove and
deactivate it, in this post-activation failure path before returning the error.
--
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]