Consider five nodes(S1,S2,S3,S4,S5) getting key/value data. And the following steps happened
After above steps, client query an entry(key equal 2, just wrote succeed). But now S1 is leader and key equal 2 entry is uncommitted. So, client will can't find entry that itself wrote a moment ago. So, where I made a mistake? please help me (picture 1)
(picture 2)
(picture 3)
I have found the solution at Diego Ongaro paper more detailed version In Search of an Understandable Consensus Algorithm(Extended Version) . In section 8(Client interaction), I found the answer, Raft handles this by having each leader commit a blank no-op entry into the log at the start of its term. After this, In question S1 will commit log index equal 1 entry by commit a blank no-op entry.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.