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

check follower's log gap before transfer leader to it #443

Open
JayiceZ opened this issue Mar 12, 2024 · 0 comments
Open

check follower's log gap before transfer leader to it #443

JayiceZ opened this issue Mar 12, 2024 · 0 comments

Comments

@JayiceZ
Copy link

JayiceZ commented Mar 12, 2024

In braft's current implementation. if user call transfer_leadership_to a follower, The original leader will call on_leader_stop then wait for the destination follower to catch up log and become new leader. During this time, the raft group can not serve writes.

If there's a big gap between leader's log and the destination follower's log, it will take a long time to wait for the follower to catch up until transfer timeout.

Similar issue: #422

Checking if follower's log is new enough before we actually do transfer_leader may be a nice improvement.

If the improvement is needed, I can submit a PR for it

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