Add unidirectional partition test#3
Open
zhoujianzzz wants to merge 1 commit into
Open
Conversation
f91ea72 to
fcc7d59
Compare
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.
In some situations, a one-way network partition could occur, where the existing leader in an etcd cluster is able to receive vote requests from a candidate, but can't send responses back. This could obstruct the election of a new leader since the candidate may not receive sufficient votes without a response from the original leader.
Without a
PreVotephase in place, this network partition could result in the original leader erroneously transitioning to a follower state. Furthermore, the etcd cluster would remain leaderless as it's unable to elect a new leader due to the lack of necessary votes.This is why etcd implements a
PreVotestate. It acts as a preventive measure to maintain stability in the cluster and ensure a smooth transition of leadership, even in the face of network partitions.To ensure this situation is adequately addressed, it is recommended to include unidirectional network partition tests in the test coverage.