Skip to content

refactor: simplify raft entry proposal

Georgy Moshkin requested to merge gmoshkin/refactor-entry-context into master

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
Edited by Yaroslav Dynnikov

Merge request reports