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

No-one becomes a leader after netsplit #25

Closed
kzemek opened this issue Jun 17, 2016 · 3 comments
Closed

No-one becomes a leader after netsplit #25

kzemek opened this issue Jun 17, 2016 · 3 comments

Comments

@kzemek
Copy link

kzemek commented Jun 17, 2016

I found an unexpected behaviour of locks_leaders; I confirmed it using test_cb.erl. The repro is very simple:

  1. start test_cb on nodes A and B; each process is a leader
  2. connect A with B; one of test_cb processes will become the leader
  3. disconnect A and B; each process is a leader again
  4. connect A with B; both processes will be "elected" at the same time, after which both will surrender.

test_cb node A logs
test_cb node B logs

@uwiger
Copy link
Owner

uwiger commented Jun 18, 2016

Indeed. I've pushed a fix, which also has a test for the 2-node case. I verified that it failed before, and it seems to pass with the last commit - see PR #26

@kzemek
Copy link
Author

kzemek commented Jun 18, 2016

Seems to work for me. After updating to locks from the new branch I had one case where both leaders surrendered after the first connection (no netsplit in the meantime); I recompiled immediately and couldn't reproduce it after.

@uwiger
Copy link
Owner

uwiger commented Jun 18, 2016

Ok, I've merged the PR. Thanks for your help!

@uwiger uwiger closed this as completed Jun 18, 2016
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

2 participants