-
Notifications
You must be signed in to change notification settings - Fork 232
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
Leadership expiry not respected as a limit for leadership expiry #522
Comments
Thanks for pointing this out. Looks like this part of code was previously correct, and then the bug has been introduced since the below commit. As std::list<ptr<peer>> get_not_responding_peers(int expiry = 0);
size_t get_not_responding_peers_count(int expiry = 0);
void apply_to_not_responding_peers(const std::function<void(const ptr<peer>&)>& callback, int expiry); If given |
Hi, @greensky00. Thanks for the fast response. The change which you suggested makes sense. I will open the PR to fix it! |
Hi,
I expected the
leadership_expiry_
flag to be used as the amount of time needed to pass between now and the last time the follower responded to the leader, for the leader to yield its leadership.However, looking at the code, leadership only expires after followers are deemed unhealthy. And followers are deemed unhealthy according to the following policy:
I would like to open PR to fix this issue that the expiry used in this function is the same as the leadership expiry time, as otherwise this flag is not used to calculate when will leadership expire.
Let me know if this is actually not an issue, and I didn't understand something properly.
many thanks,
Antonio
The text was updated successfully, but these errors were encountered: