Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leader can still accept read requests when transferring leader #468

Open
BusyJay opened this issue Jul 23, 2024 · 0 comments
Open

leader can still accept read requests when transferring leader #468

BusyJay opened this issue Jul 23, 2024 · 0 comments

Comments

@BusyJay
Copy link
Contributor

BusyJay commented Jul 23, 2024

Because new leader has to disrupt the old leader before it can receive votes from other candidates, so old leader will always has the latest data before it votes for the new leader and in lease. So it's safe for old leader to accept read requests. Though it should not accept write requests to avoid breaking transfer leader.

The current implementation will call _leader_lease.on_leader_stop(), which will expires lease and prevent accepting any read requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant