Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
etcdserver: adjust election timeout on restart #9415
Address #9333 with simpler logic.
Single-node restart with no snapshot does not need special handling, because itself will be elected as leader, by the time peer connection report wait times out.
Fresh start 1-node cluster
Restart 1-node cluster from snapshot
Restart 1-node with no snapshot
Leader gets elected while waiting for peer connection report timeouts, so no side-effect.
Fresh start 3-node
Rejoining to 3-node cluster with snapshot
Peer connection is notified and advance with adjusted ticks.
Rejoining to 3-node cluster with no snapshot
/cc @xiang90 @jpbetz
@@ Coverage Diff @@ ## master #9415 +/- ## ========================================= Coverage ? 72.48% ========================================= Files ? 362 Lines ? 30827 Branches ? 0 ========================================= Hits ? 22344 Misses ? 6854 Partials ? 1629