cowsql / raft

Asynchronous C implementation of the Raft consensus protocol
https://raft.readthedocs.io
Other
45 stars 6 forks source link

replication: Set a saturated status flag when entries are lagging #151

Closed freeekanayaka closed 7 months ago

freeekanayaka commented 7 months ago

If a follower is not persisting entries fast enough (e.g. because the disk is full), it will now stop accepting new entries, and will set a status flag for informing the leader of this.

In turn, the leader will stop sending new entries until the follower clears the flag.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (e57e29c) 73.86% compared to head (4c3ff2b) 73.98%.

Files Patch % Lines
src/replication.c 80.00% 0 Missing and 3 partials :warning:
src/recv_append_entries.c 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #151 +/- ## ========================================== + Coverage 73.86% 73.98% +0.12% ========================================== Files 52 52 Lines 10028 10053 +25 Branches 2442 2449 +7 ========================================== + Hits 7407 7438 +31 + Misses 1267 1260 -7 - Partials 1354 1355 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.