Commit f563e205 authored by Willem Thiart's avatar Willem Thiart
Browse files

Ignore appendentry response if matchIdx is enough

Thanks to @ar104 for the fix!
parent 41210d8e
...@@ -191,6 +191,10 @@ int raft_recv_appendentries_response(raft_server_t* me_, ...@@ -191,6 +191,10 @@ int raft_recv_appendentries_response(raft_server_t* me_,
return 0; return 0;
} }
/* response to a repeat transmission -- ignore */
if (raft_node_get_match_idx(p) == r->current_idx)
return 0;
raft_node_set_next_idx(p, r->current_idx + 1); raft_node_set_next_idx(p, r->current_idx + 1);
raft_node_set_match_idx(p, r->current_idx); raft_node_set_match_idx(p, r->current_idx);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment