We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5edb28f commit 112c9ecCopy full SHA for 112c9ec
src/raft.c
@@ -639,6 +639,15 @@ static int raft_compact(raft_t raft) {
639
e->bytes = e->update.len;
640
e->snapshot = true;
641
assert(l->first == l->applied - 1);
642
+
643
+ // reset bytes progress of peers that were receiving the compacted entries
644
+ for (int i = 0; i < raft->config.peernum_max; i++) {
645
+ raft_peer_t *p = raft->peers + i;
646
+ if (!p->up) continue;
647
+ if (i == raft->me) continue;
648
+ if (p->acked.entries + 1 <= l->first)
649
+ p->acked.bytes = 0;
650
+ }
651
}
652
return compacted;
653
0 commit comments