Skip to content

Commit

Permalink
Merge branch 'ZSTOR-7327' into 'master'
Browse files Browse the repository at this point in the history
[Bugfix] ZSTOR-7327 reset match_leader when leader changed

See merge request !102
  • Loading branch information
吴红伟 committed Nov 15, 2022
2 parents 4339175 + 9a6f090 commit ed4b017
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ int recvUpdateLeader(struct raft *r, const raft_id id)
assert(r->state == RAFT_FOLLOWER);

if (r->follower_state.current_leader.id != id) {
r->follower_state.current_leader.id = id;
r->follower_aux.match_leader = false;
r->follower_state.current_leader.id = id;
if (r->state_change_cb)
r->state_change_cb(r, RAFT_FOLLOWER);
}
Expand Down

0 comments on commit ed4b017

Please sign in to comment.