Skip to content

Commit

Permalink
change progress status to replicate when handling heartbeat response
Browse files Browse the repository at this point in the history
Signed-off-by: luditing <[email protected]>
  • Loading branch information
LuDiting committed Jan 17, 2025
1 parent 2fbeee5 commit d21b123
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/raft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1882,6 +1882,8 @@ impl<T: Storage> Raft<T> {
if pr.matched < self.r.raft_log.last_index() || pr.pending_request_snapshot != INVALID_INDEX
{
self.r.send_append(m.from, pr, &mut self.msgs);
} else {
pr.become_replicate();
}

if self.read_only.option != ReadOnlyOption::Safe || m.context.is_empty() {
Expand Down

0 comments on commit d21b123

Please sign in to comment.