Why is the etcd raft LeaseRead correct? #17360
Unanswered
1797818494
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the Raft paper, there is a mentioned optimization method for Lease Read using clock + heartbeat. When the leader sends a heartbeat, it first records a timestamp called "start". If the majority of the nodes in the system respond with heartbeat responses, it is assumed that the leader's lease is valid until the time point "start + election timeout / clock drift bound".
But when I read the code in etcd 3.1.10.In this, Lease Read operation does rely on the majority of nodes having RecentActive set to true within an election timeout period, and the exact point of "start" cannot be determined https://github.com/lichuang/etcd-3.1.10-codedump/blob/master/cmd/etcd/raft/raft.go#L1246
Beta Was this translation helpful? Give feedback.
All reactions