Fix AddConfigNode retry idempotency#17874
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #17874 +/- ##
============================================
+ Coverage 40.85% 40.86% +0.01%
Complexity 2611 2611
============================================
Files 5201 5201
Lines 354010 354028 +18
Branches 45313 45314 +1
============================================
+ Hits 144626 144679 +53
+ Misses 209384 209349 -35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
MileaRobertStefan
pushed a commit
to MileaRobertStefan/iotdb
that referenced
this pull request
Jun 26, 2026
JackieTien97
pushed a commit
that referenced
this pull request
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR makes ConfigNode membership changes idempotent during
AddConfigNodeProcedureretry paths.When
ADD_CONSENSUS_GROUPtimes 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:
ConsensusGroupAlreadyExistExceptionfromcreateLocalPeeras success.PeerAlreadyInConsensusGroupExceptionfromaddRemotePeeras success.PeerNotInConsensusGroupExceptionfrom rollbackremoveRemotePeeras success.deleteConfigNodePeerto clean up a local peer even before the ConfigNode is present inregisteredConfigNodes, while still rejecting requests targeting a different ConfigNode id.Tests
Both commands passed. The local sandbox logs Develocity cache/write warnings for
~/.m2/.develocity, but Maven reportsBUILD SUCCESS.