CRZbulabula opened a new pull request, #17874: URL: https://github.com/apache/iotdb/pull/17874
## Summary This PR makes ConfigNode membership changes idempotent during `AddConfigNodeProcedure` retry paths. When `ADD_CONSENSUS_GROUP` times out, the first request may have already created the local ConfigRegion peer on the joining ConfigNode. A retry then sees the consensus group already exists and previously failed the procedure, which could leave the new ConfigNode process alive but not registered in the cluster. Changes: - Treat `ConsensusGroupAlreadyExistException` from `createLocalPeer` as success. - Treat `PeerAlreadyInConsensusGroupException` from `addRemotePeer` as success. - Treat `PeerNotInConsensusGroupException` from rollback `removeRemotePeer` as success. - Allow `deleteConfigNodePeer` to clean up a local peer even before the ConfigNode is present in `registeredConfigNodes`, while still rejecting requests targeting a different ConfigNode id. ## Tests ``` mvn spotless:apply -pl iotdb-core/confignode mvn test -pl iotdb-core/confignode -Dtest=ConsensusManagerTest,ConfigNodeRPCServiceProcessorTest ``` Both commands passed. The local sandbox logs Develocity cache/write warnings for `~/.m2/.develocity`, but Maven reports `BUILD SUCCESS`. -- 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]
