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

Do not change leader when doing reconfiguration #420

Open
yacovm opened this issue Feb 3, 2020 · 0 comments
Open

Do not change leader when doing reconfiguration #420

yacovm opened this issue Feb 3, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@yacovm
Copy link
Contributor

yacovm commented Feb 3, 2020

As the amount of nodes increases, f increases, so the likelihood of having nodes that are unreachable/crashed increases as well.

The leader ID is currently calculated as the index of the node in the position v % n when v is the view ID and n is the node count.
Due to the way we calculate this leader ID, the leader ID might change when we do a reconfiguration that adds or removes nodes.

If we change the leader ID but this node might be offline/unreachable at that time, it means that doing a reconfiguration might cause downtime (view change).

To circumvent this problem, I propose that we persist the leader ID in the view metadata, and:

  • Increment modulo n this leader ID when we do a view change
  • Persist this leader ID, when we do a reconfiguration, unless the leader itself is removed, and in that case we just pick the next leader ID.
@HagarMeir HagarMeir added the enhancement New feature or request label Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants