The raftLog structure currently plays multiple roles. Notably:
- Provides read/write access to the raft log (both the
unstable in-memory part, and the Storage part), and keeps the basic metadata about the log.
- To some degree, ensures correctness w.r.t. the core
raft algorithm.
- Implements flow control mechanisms for applying the commands from this log.
The flow control role is quite distinct from the other roles, and is less fundamental. It should be decoupled. Once decoupling is done, raftLog can be isolated in its own package and rigorously tested without assumptions about the flow.
Related to #64, though this clean-up has value on its own.
The raftLog structure currently plays multiple roles. Notably:
unstablein-memory part, and theStoragepart), and keeps the basic metadata about the log.raftalgorithm.The flow control role is quite distinct from the other roles, and is less fundamental. It should be decoupled. Once decoupling is done,
raftLogcan be isolated in its own package and rigorously tested without assumptions about the flow.Related to #64, though this clean-up has value on its own.