Even requests to a replicated state machine do not have sideeffect (e.g. read request of KVS), Raft needs to write them inits persistent log.
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+unsubscribe@googlegroups.com.
> E.g., simply asking the leader what its current end of the log is, ...The thing to watch out for here is accidentally asking a "leader" who is not a leader any more, but hasn't realize it yet. Depending on how much you trust your clocks you might be able to get away with a leader assuming no one will try to vote it out for some amount of time after it gets elected, but the only way to be *sure* (that I have seen; would love to be wrong) is to successfully put something in the log after getting the read request.
In my experience, if you want to scale reads up you need to give up on linearizability.
I'm still confused by the original email. Writing something into the log gives you an obvious linearization (the log index), and that's simple but slow. My dissertation explains how to get the exact same guarantees without touching the log in section 6.4.0, requiring one round of communication from the leader to half the followers to confirm its leadership. (David, I hope you do truly love being wrong.) Then 6.4.1 talks about eliminating the round of communication by relying on clocks.Hitoshi, is your proposal solving a different problem than 6.4.0? Or is it better by some metric than the solution in 6.4.0? It may also help if you walk us through a detailed example of a read request with your proposed hole approach.
Hi Diego,On Tue, Aug 23, 2016 at 5:51 AM, Diego Ongaro <onga...@gmail.com> wrote:I'm still confused by the original email. Writing something into the log gives you an obvious linearization (the log index), and that's simple but slow. My dissertation explains how to get the exact same guarantees without touching the log in section 6.4.0, requiring one round of communication from the leader to half the followers to confirm its leadership. (David, I hope you do truly love being wrong.) Then 6.4.1 talks about eliminating the round of communication by relying on clocks.Hitoshi, is your proposal solving a different problem than 6.4.0? Or is it better by some metric than the solution in 6.4.0? It may also help if you walk us through a detailed example of a read request with your proposed hole approach.I read section 6.4.0 of your thesis again, and noticed that my idea would be almost equal to the idea described in the section.In the steps described in the section, step 3 has the below line:"It issues a new round of heartbeats and waits for their acknowledgments from a majority of the cluster."When I first read the description, I didn't think that the "new round of heartbeats" is triggered by read request processing of the leader. So I thought it is an optimization for throughput with batching multiple read requests (the batching idea is described in the sentence of "To improve efficiency further...").However, if the round is triggered by the read request processing (is this right?), the optimization allows processing read request in a timely manner without synchronous disk write. And it is almost same to my idea.
Sorry for confusion and thanks for correcting my understanding!
On Tue, Aug 23, 2016 at 11:43 PM, Hitoshi Mitake <mitake....@gmail.com> wrote:Hi Diego,On Tue, Aug 23, 2016 at 5:51 AM, Diego Ongaro <onga...@gmail.com> wrote:I'm still confused by the original email. Writing something into the log gives you an obvious linearization (the log index), and that's simple but slow. My dissertation explains how to get the exact same guarantees without touching the log in section 6.4.0, requiring one round of communication from the leader to half the followers to confirm its leadership. (David, I hope you do truly love being wrong.) Then 6.4.1 talks about eliminating the round of communication by relying on clocks.Hitoshi, is your proposal solving a different problem than 6.4.0? Or is it better by some metric than the solution in 6.4.0? It may also help if you walk us through a detailed example of a read request with your proposed hole approach.I read section 6.4.0 of your thesis again, and noticed that my idea would be almost equal to the idea described in the section.In the steps described in the section, step 3 has the below line:"It issues a new round of heartbeats and waits for their acknowledgments from a majority of the cluster."When I first read the description, I didn't think that the "new round of heartbeats" is triggered by read request processing of the leader. So I thought it is an optimization for throughput with batching multiple read requests (the batching idea is described in the sentence of "To improve efficiency further...").However, if the round is triggered by the read request processing (is this right?), the optimization allows processing read request in a timely manner without synchronous disk write. And it is almost same to my idea.Yep, I'll leave that decision up to you. As a simple point in the design space, LogCabin sends out the heartbeats right away if there aren't any outstanding, otherwise queues the next round of heartbeats when the first gets back. The next round should satisfy any reads that have arrived in the meantime.