Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 61158ee

Browse files
committed
Fix the 'is applied' test in Raft.
1 parent d428903 commit 61158ee

File tree

1 file changed

+2
-2
lines changed
  • contrib/raftable/raft/src

1 file changed

+2
-2
lines changed

contrib/raftable/raft/src/raft.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,13 +753,13 @@ int raft_emit(raft_t r, raft_update_t update) {
753753
bool raft_applied(raft_t r, int id, int index) {
754754
if (r->me == id)
755755
{
756-
return r->log.applied >= index;
756+
return r->log.applied > index;
757757
}
758758
else
759759
{
760760
raft_peer_t *p = r->peers + id;
761761
if (!p->up) return false;
762-
return p->applied >= index;
762+
return p->applied > index;
763763
}
764764
}
765765

0 commit comments

Comments
 (0)