-
Notifications
You must be signed in to change notification settings - Fork 995
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raft pre-vote extension implementation (#530)
* prevote initial implementation * add config and relevant tests * remove extra comments, fix a case where newer term is discovered for prevote * fix to reset timeout after pre-vote and fix split vote (pre-vote,vote) case. * fix a case where granted votes and prevotes don't reach quorum but the sum can reach quorum * add submodule and first iteration of multi-version tests rename test and pin submodule to version 1.5.0 rename test file * refactor test * clean up node init * clean up leader rolling upgrade * fix use of deprecate Leader method * extract cluster package * export cluster Type * clean up tests and add test utils * rename package to raftlatest * remove submodule * new submodule * fix go.mod * change inmemConfig to be not exported * remove unused func * add replace rolling upgrade tests * rename raft-latest to raft-previous * rename raft-latest to raft-previous submodule * fix submodule * remove printf * use same name for recycled servers, add other leave scenarios * prevote initial implementation * add config and relevant tests * remove extra comments, fix a case where newer term is discovered for prevote * fix to reset timeout after pre-vote and fix split vote (pre-vote,vote) case. * write upgrade tests that include prevotes * add more test cases * fix submodule version * go mod tidy * update pervious version to v1.6.0 * fix merge duplication * add submodule and first iteration of multi-version tests rename test and pin submodule to version 1.5.0 rename test file * refactor test * clean up node init * clean up leader rolling upgrade * fix use of deprecate Leader method * extract cluster package * export cluster Type * clean up tests and add test utils * rename package to raftlatest * remove submodule * new submodule * fix go.mod * change inmemConfig to be not exported * remove unused func * add replace rolling upgrade tests * rename raft-latest to raft-previous * rename raft-latest to raft-previous submodule * fix submodule * remove printf * use same name for recycled servers, add other leave scenarios * prevote initial implementation * add config and relevant tests * remove extra comments, fix a case where newer term is discovered for prevote * fix to reset timeout after pre-vote and fix split vote (pre-vote,vote) case. * write upgrade tests that include prevotes * add more test cases * fix submodule version * prevote initial implementation * add config and relevant tests * remove extra comments, fix a case where newer term is discovered for prevote * fix to reset timeout after pre-vote and fix split vote (pre-vote,vote) case. * fix a case where granted votes and prevotes don't reach quorum but the sum can reach quorum * go mod tidy * update pervious version to v1.6.0 * fix merge duplication * fix rebase issues * use a different RPC command for prevote. * fix prevote tests and add rollback tests * add a partitioned node prevote test * remove server from config before shutting down, fix raft submodule * remove extra comment * change `inmemConfig` to accept testing.TB * remove stray comment * fix comments and remove extra fields * remove duplicate var * remove leader transfer from pre-vote path, fix logs and comments. * make pre-vote enabled by default * remove `Candidate` field from pre-vote request * add warning when transport don't support prevote * panic if transport is not supported in preElectSelf. * Fix comments and log string Co-authored-by: Paul Banks <[email protected]> * Fix to log the right number for votesNeeded, added preVoteRefusedVotes to the log --------- Co-authored-by: Paul Banks <[email protected]>
- Loading branch information
1 parent
341ea38
commit 181475c
Showing
18 changed files
with
931 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.