Commit ef596320 authored by Yossi Gottlieb's avatar Yossi Gottlieb
Browse files

Fix off-by-one in apply_log idx.

parent af95e333
......@@ -794,7 +794,7 @@ int raft_apply_entry(raft_server_t* me_)
me->last_applied_idx++;
if (me->cb.applylog)
{
int e = me->cb.applylog(me_, me->udata, ety, me->last_applied_idx - 1);
int e = me->cb.applylog(me_, me->udata, ety, me->last_applied_idx);
if (RAFT_ERR_SHUTDOWN == e)
return RAFT_ERR_SHUTDOWN;
}
......
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