From 7e5b70a2012aebac2607e9e3b3b61c108c682884 Mon Sep 17 00:00:00 2001 From: ehds Date: Fri, 23 Jun 2023 16:18:55 +0800 Subject: [PATCH] fix-renew-follower-lease-after-voting --- src/braft/node.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/braft/node.cpp b/src/braft/node.cpp index f5802f7f..dcabc67b 100644 --- a/src/braft/node.cpp +++ b/src/braft/node.cpp @@ -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();