Skip to content

Using a channel to asynchronously receive a reply from StateMachine::apply(). #208

Open
@drmingdrmer

Description

@drmingdrmer

The reply should happen asynchronously, somehow. Make this method synchronous
and instead of using the result, pass a channel where to post the completion.

The Raft core can then collect completions on this channel and update the client
with the result once all the preceding operations have been applied to the state
machine. This way we'll reach operation pipelining w/o the need to wait for the
completion of each operation inline.

https://github.com/datafuselabs/openraft/blob/46644c8409c7dff627c991cc65849507ad5265b3/openraft/src/storage.rs#L324-L329

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions