refactor: simplify raft entry proposal
Summary
-
refactor: simplify raft entry proposal
- remove logical clock from raft entry context, (term, index) is used for synchronization instead
- this allows us to remove the Notify/Notifier boilerplate
- NodeImpl::notifications -> NodeImpl::read_state_wakers
- this and the recently refactored proc_join finally allows us to remove OpResult
- ContextCoercion & CoercionError are also removed for the sake of simplification
-
fix: forbid direct proposal of entries on followers
- removed method NodeImpl::propose (propose_async replaces it)
- make NodeImpl::propose_async return Error on followers, only leader can propose entries directly, others should use CAS
- remove all tests which used direct entry proposal on followers, they're not needed anymore
- Close #367 (closed)
- Close #309 (closed)
- Close #370 (closed)
- Close #195 (closed)
Edited by Yaroslav Dynnikov