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

Heartbit doesn't delete resources #12

Open
netDalek opened this issue Jan 14, 2015 · 2 comments
Open

Heartbit doesn't delete resources #12

netDalek opened this issue Jan 14, 2015 · 2 comments

Comments

@netDalek
Copy link

I probably just can't understand the rigth behaviour, but I don't know the better way to ask. May be this question will help smb.

I start two nodes with resource_discovery application (with heartbit). Run on the first:

resource_discovery:add_local_resource_tuple({worker, a}).
resource_discovery:sync_resources().

And run on the second:

resource_discovery:add_target_resource_types([worker]).
resource_discovery:sync_resources().
resource_discovery:get_resources(worker). #[a]

And get the resource. It's OK. Then I kill first node. But I still get registered resource, calling resource_discovery:get_resources(worker). Calling sync_resources and contract_nodes doesn't help. Should it disappeared? Where is my mistake?

@ericbmerritt
Copy link
Member

@martinjlogan thoughts

@martinjlogan
Copy link
Member

It should not. Heartbeat is not a one sized fits all fit for understanding
if a resource is there or not. All the heartbeat does is rejoin a cluster
if it gets separated for some reason. Honestly, at this point I question
whether hearbeat is even a good feature or something that should be
implemented at the application level or at least a higher level than RD. I
am open to dissenting ideas though.

On Wed, Apr 1, 2015 at 6:17 PM, Eric Merritt [email protected]
wrote:

@martinjlogan https://github.com/martinjlogan thoughts


Reply to this email directly or view it on GitHub
#12 (comment)
.

Martin Logan
Erlang & OTP in Action (Manning) http://manning.com/logan
http://twitter.com/martinjlogan
http://erlware.org

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

3 participants