Don't pre-vote, causes flapping on split vote

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2021-01-25 13:49:20 -08:00
parent 162bc1a0c4
commit 7d8c3eaa6e

View File

@@ -692,8 +692,6 @@ func (n *raft) campaign() error {
if n.state == Leader {
return errAlreadyLeader
}
// Pre-place our vote for ourselves.
n.vote = n.id
n.resetElect(randCampaignTimeout())
return nil
}