jmsadair / raft

An implementation of the Raft consensus protocol.
MIT License
35 stars 3 forks source link

Snapshot refactor #30

Closed jmsadair closed 1 year ago

jmsadair commented 1 year ago

This PR modifies the StateMachine interface such that NeedSnapshot now accepts a an unsigned integer representing the size of the log in bytes. This is more useful for users of this library - prior to this, there was not an easy way to determine when a snapshot should be taken based off of the size of the persisted log.

The existing test suite suffices to cover this change. No new tests were added.