Commit 8e9d6c65 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by Willem
Browse files

Try to apply all committed entries in raft_periodic(). (#54)

This is a breaking change.
parent d1885191
...@@ -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;
} }
......
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