supposed a 3-member raft cluster a[leader],b,c
client send command to a, a replicate it to b and c, a apply the log to the status machine and response to client, then crash before replicate the committed state to b and c.
b replaces a to be the cluster leader. then what will happen to the uncommitted log while the log has been respond to the client? will it be replicated by b again or just discarded?
then supposed a 4-member raft cluster a[master],b,c,d
client send command to a, a replicate it to b and c(no d), a apply the log to the status machine and response to client, then crash before replicate the committed state to b and c and d.
d replaces a to be the cluster leader. then what will happen to the uncommitted log while the log has been respond to the client? will it be just discarded?
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "raft-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
supposed a 3-member raft cluster a[master],b,c
client send command to a, a replicate it to b and c, a apply the log to the status machine and response to client, then crash before replicate the committed state to b and c.
b replaces a to be the cluster leader. then what will happen to the uncommitted log while the log has been respond to the client? will it be replicated by b again or just discarded?
then supposed a 4-member raft cluster a[master],b,c,d
client send command to a, a replicate it to b and c(no d), a apply the log to the status machine and response to client, then crash before replicate the committed state to b and c and d.
d replaces a to be the cluster leader. then what will happen to the uncommitted log while the log has been respond to the client? will it be just discarded?
supposed a 3-member raft cluster a[master],b,c
client send command to a, a replicate it to b and c, a apply the log to the status machine and response to client, then crash before replicate the committed state to b and c.
b replaces a to be the cluster leader. then what will happen to the uncommitted log while the log has been respond to the client? will it be replicated by b again or just discarded?
then supposed a 4-member raft cluster a[master],b,c,d
client send command to a, a replicate it to b and c(no d), a apply the log to the status machine and response to client, then crash before replicate the committed state to b and c and d.
d replaces a to be the cluster leader. then what will happen to the uncommitted log while the log has been respond to the client? will it be just discarded?
Hi, Jordan:Based on your comments:
When b becomes the leader it will commit the entry for which it never received the updated commitIndex from the prior leader. Indeed, part of the new leader's responsibilities when it becomes the leader is to ensure all entries it logged prior to the start of its term are stored on a majority of servers and then commit them. That means server B sends an AppendEntries RPC to C, verifies that C has all the entries prior to the start of leader B's term, then increases the commitIndex beyond the start of its term (usually by committing a no-op entry) and applies the entries left over from the prior term to its state machine.
Every time a new term (leadership) begins, it is possible that a Read request will read a stale state machine. Right? Since the new leader needs to send and collect one round of heartbeat (AppendEntries). Does this means the before the first heartbeat round is finishing, no read is available?Thanks,Yihao
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+unsubscribe@googlegroups.com.