Skip to content

Does the CompletableFuture of RaftNode#replicate guarantee that it has been processed in the StateMachine of all nodes? #22

Closed Answered by metanet
bootjp asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, I love these questions!

Thanks @bootjp for using the library. I would appreciate if you share your insights and experience.

When you call get or join on the CompletedFuture of RaftNode#replicate, do you guarantee that all nodes have completed their StateMachine processing?
This can be rephrased as Read After Write.

When the future returned by RaftNode#replicate() is completed, it is guaranteed that the leader has replicated your operation to the majority nodes and executed it locally. The other followers may not have executed your operation yet, even though the operation is certainly appended to the Raft logs of the majority nodes.

If you issue a LINEARIZABLE read to the leader, you…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@bootjp
Comment options

Answer selected by bootjp
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants