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
8e9d6c65
Commit
8e9d6c65
authored
May 17, 2018
by
Yossi Gottlieb
Committed by
Willem
May 17, 2018
Browse files
Try to apply all committed entries in raft_periodic(). (#54)
This is a breaking change.
parent
d1885191
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
8e9d6c65
...
@@ -236,7 +236,7 @@ int raft_periodic(raft_server_t* me_, int msec_since_last_period)
...
@@ -236,7 +236,7 @@ int raft_periodic(raft_server_t* me_, int msec_since_last_period)
if
(
me
->
last_applied_idx
<
raft_get_commit_idx
(
me_
)
&&
if
(
me
->
last_applied_idx
<
raft_get_commit_idx
(
me_
)
&&
!
raft_snapshot_is_in_progress
(
me_
))
!
raft_snapshot_is_in_progress
(
me_
))
{
{
int
e
=
raft_apply_
entry
(
me_
);
int
e
=
raft_apply_
all
(
me_
);
if
(
-
1
!=
e
)
if
(
-
1
!=
e
)
return
e
;
return
e
;
}
}
...
...
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