cowsql / raft

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

replication: Drop unnecessary check on `prev_index` being the last #145

Closed freeekanayaka closed 9 months ago

freeekanayaka commented 9 months ago

In order to decide whether a snapshot is needed, it is sufficient to check if the previous entry is present or not.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5d308b0) 73.80% compared to head (3359bd4) 73.82%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #145 +/- ## ========================================== + Coverage 73.80% 73.82% +0.01% ========================================== Files 52 52 Lines 10005 10005 Branches 2436 2436 ========================================== + Hits 7384 7386 +2 Misses 1272 1272 + Partials 1349 1347 -2 ```

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