Skip to content
Snippets Groups Projects

fix: bug in raft snapshot application

Merged Georgy Moshkin requested to merge gmoshkin/raft-msg-reject-term-0 into master
All threads resolved!
Compare changes
  • Side-by-side
  • Inline
Files
3
  • We used to automatically truncate the index in compact_log if the caller
    requested to compact too many entries. This made it so that the
    requirement of not compacting any un-applied entries was implicit in our
    code base, which is not good as it allows for some bugs to creep in
    (like the one we fix a couple commits ago).
    
    Now this is changed and instead of silently adjusting the index of last
    compacted entry, we just assert that it's no greater than the applied
    index. As a consequence there's a minor improvement in do_raft_log_auto_compaction
    function.
Loading