fix(etcd): make member join replay idempotent - #3235
Draft
weicao wants to merge 3 commits into
Draft
Conversation
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.
What this fixes
Closes #3234.
memberJoinno longer blindly adds a member on every lifecycle-action replay.It now reads authoritative membership before mutation, adds an absent member at
most once, and verifies membership again after the add attempt.
Behavior
closed with retry classification.
The fields parser validates decimal member IDs, quoted Name values, nonempty
quoted PeerURL values, and duplicate Name fields. Multiple valid PeerURL fields
remain supported.
Verification
31 examples / 4 failuresfor malformed fields,then
34 examples / 2 failuresfor the quoted-empty PeerURL boundary.34/0.69/0.production
add_memberreturning rc=1 with zero add calls for malformedinput.
unstarted-registered; legal multiple-PeerURL input classifies asexact.pass.
Fixture SHA-256 values remain unchanged:
25406312dafba48e31b88157df628f4c1f0691928f9a3b0e804f4930e24cc9d6c950babd452e3243e74a3d74c5584bd4fa26224077d13f62955e0ae04c245769The full base diff has two intentional
git diff --checkfindings: the finalblank line in each real-output fixture is an exact captured block delimiter and
is protected by the fixture SHA.