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

sync_ping issue #3

Open
ethertricity opened this issue Sep 26, 2012 · 1 comment
Open

sync_ping issue #3

ethertricity opened this issue Sep 26, 2012 · 1 comment
Assignees

Comments

@ethertricity
Copy link

I'm using resource_discovery in an environment where I want to bring nodes up and down regularly.

The rd_util:sync_ping/2 function waits until the nodes(known) on a remote matches in number the nodes(known) on this node. It fails if this doesn't happen within timeout.

If I have a 'contact' node, and two nodes 'foo' and 'bar' then this sequence will break it:

  1. Bring up 'contact'.
  2. Bring up 'foo' and 'bar'
  3. Bring down 'foo' and 'bar'
  4. Bring up 'foo'.

After step 4, the 'contact' node has 3 nodes known, and the 'foo' node has 2 nodes known.

I am wondering why the cardinality of 'known' nodes is important?

I would suggest simply using nodes() in line 49, not nodes(known).

@martinjlogan
Copy link
Member

ethertricity nodes(known) will cause this problem if the nodes are brought up and down rapidly. The reasoning for nodes(known) is historical and had to due with the production system that originally used resource_discovery. I agree that this should be removed. If you have a patch please send a pull request and I will take care of it. If not, I will make the change myself when I am back from vacation.

@ghost ghost assigned martinjlogan Oct 6, 2012
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