etcd-io / etcd-io/raft

Question about LeaseRead

Open
#166 9 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Go
Stars
1.1k
Forks
273
Avg merge
4h 12m
Merged PRs (30d)
10

Description

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 etcd LeaseRead code, it seems that LeaseRead depend on the checkquorum. When the leader receive the major of heartbeat responses in the half of election_timeout, the MsgCheckQuorum will not step the leader down on this election_timeout round. The next round, the leader step down into follower because the major of nodes is not recentActive.This case seems that the leasetime last 1.5 election_timeout.This confused me.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the LeaseRead and checkquorum handling, especially the MsgCheckQuorum path and heartbeat response timing mentioned in the issue. Trace how recentActive is updated across election-timeout rounds, then document whether the observed lease duration matches the intended behavior or identifies a defect.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.