Skip to content

Commit

Permalink
fix-renew-follower-lease-after-voting
Browse files Browse the repository at this point in the history
  • Loading branch information
ehds committed Jun 23, 2023
1 parent e32b78a commit 7e5b70a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/braft/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,7 @@ void NodeImpl::step_down(const int64_t term, bool wakeup_a_candidate,
_vote_ctx.reset(this);
} else if (_state == STATE_FOLLOWER) {
_pre_vote_ctx.reset(this);
_follower_lease.renew(PeerId());
} else if (_state <= STATE_TRANSFERRING) {
_stepdown_timer.stop();
_ballot_box->clear_pending_tasks();
Expand Down

0 comments on commit 7e5b70a

Please sign in to comment.