the definition about committed

76 views
Skip to first unread message

yang...@gmail.com

unread,
Dec 28, 2016, 12:21:04 AM12/28/16
to raft-dev
I'm reading the paper 'In Search of an Understandable Consensus Algorithm' now. But I'm not sure about the definition of committed Entry. Could anyone help me out ?

Oren Eini (Ayende Rahien)

unread,
Dec 28, 2016, 1:14:53 AM12/28/16
to raft...@googlegroups.com
A log entry can have several states.

1) It is in the log, but not in the majority of logs
2) It is in the majority of the logs, but not committed
3) It is committed, which require that it is in the majority of the logs.


Consider state e in the image. 
Index 3, term 4 is actually in a majority of the cluster. That means that it will eventually be committed. But it may take a while for a leader to confirm that it was indeed replicated to a majority.
For example, S1 may have received the log entry, but is unable to talk to the leader to confirm it. 

Hibernating Rhinos Ltd  

Oren Eini l CEO 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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yang...@gmail.com

unread,
Dec 28, 2016, 1:21:38 AM12/28/16
to raft-dev
Very clear. Thanks very much.

在 2016年12月28日星期三 UTC+8下午2:14:53,Ayende Rahien写道:
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.

bo yang

unread,
Dec 28, 2016, 1:25:21 AM12/28/16
to raft-dev
So the second state for log entry is indirectly committed?


在 2016年12月28日星期三 UTC+8下午2:14:53,Ayende Rahien写道:
A log entry can have several states.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.

Kijana Woodard

unread,
Dec 28, 2016, 7:18:57 AM12/28/16
to raft...@googlegroups.com
If "indirectly" also means "not".

IoW, from our birds eye view of Figure 8, we can reason that it will eventually be committed, but from the pov of any single node or any single client, this is not knowable. For all they know, they might be transitioning from (c) to (d) instead of from (c) to (e).

To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+unsubscribe@googlegroups.com.

Hui Kang

unread,
Jan 25, 2017, 8:21:47 PM1/25/17
to raft-dev
In the Figure 8, in step (c), what if the log entry index 2 is commited to s1, s2, and s3. In this case, when s5 becomes the leader in (d), will it override the log index 2 of s1, s2, and s3? If so, this invalidate the leader completeness property.

- Hui
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.

jordan.h...@gmail.com

unread,
Jan 25, 2017, 9:58:32 PM1/25/17
to raft...@googlegroups.com
This is why the leader in C must ensure an entry from its *current term* (4) has been stored on a majority of servers before committing the entries from prior terms. Because entries from term 4 have not been stored on a majority of the cluster, the entries at index 2 will not be committed and it's therefore safe for S5 to overwrite them. If the leader replicated an entry from its own term it could then commit the entries at index 2.

This is why commitment is not defined simply as an entry being stored on a majority of servers. To be committed, and entry must be stored on a majority of servers and the leader that commits it must have first replicated an entry from its own current term to a majority of the cluster. 

Hui Kang

unread,
Jan 26, 2017, 10:22:13 AM1/26/17
to raft-dev
Hi, Jordan
Thanks for you explanation, which makes the rule much more clear. I think your explanation should be included in the extended version of the raft paper : )

- Hui
Reply all
Reply to author
Forward
0 new messages