Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Willemt Raft
Commits
f563e205
Commit
f563e205
authored
Nov 12, 2015
by
Willem Thiart
Browse files
Ignore appendentry response if matchIdx is enough
Thanks to @ar104 for the fix!
parent
41210d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
f563e205
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment