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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy