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 remove server from peer list immediately #90

Merged
merged 1 commit into from
Dec 30, 2019

Conversation

greensky00
Copy link
Contributor

  • We should not remove the server from the list immediately,
    due to the issue as follows:
  1. Let's suppose there are 3 servers: S1, S2, and S3,
    where S1 is the leader and S3 is going to leave.
  2. Generate a conf log for removing server S3.
  3. The conf log is committed by S1 and S2 only.
  4. Before delivering the conf log to S3, S1 removes
    the S3 peer info from the list.
  5. It closes the connection to S3.
  6. S3 cannot commit the config (containing removing S3).
  7. Callback function for RemovedFromCluster will be missing,
    but S3 will step down itself after 2 timeout period.
  • To address it, we will remove S3 only after the commit index
    of the last config is delivered to S3. Also we will have timeout
    for it. If we fail to deliver the commit index, S3 will be just
    force removed.

* We should not remove the server from the list immediately,
due to the issue as follows:

0) Let's suppose there are 3 servers: S1, S2, and S3,
   where S1 is the leader and S3 is going to leave.
1) Generate a conf log for removing server S3.
2) The conf log is committed by S1 and S2 only.
3) Before delivering the conf log to S3, S1 removes
   the S3 peer info from the list.
4) It closes the connection to S3.
5) S3 cannot commit the config (containing removing S3).
6) Callback function for `RemovedFromCluster` will be missing,
   but S3 will step down itself after 2 timeout period.

* To address it, we will remove S3 only after the commit index
of the last config is delivered to S3. Also we will have timeout
for it. If we fail to deliver the commit index, S3 will be just
force removed.
@greensky00 greensky00 changed the title Do not remove server from peer list immediately. Do not remove server from peer list immediately Dec 30, 2019
@greensky00 greensky00 merged commit eede595 into eBay:master Dec 30, 2019
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

Successfully merging this pull request may close these issues.

1 participant