Re: resource discovery and dead resources

Skip to first unread message

Martin Logan

Mar 27, 2014, 7:49:46 PM3/27/14
Removing resources that are on nodes that are down should happen automatically. I will take a look at that. As far as getting a list of resources that are valid that is not possible to do automatically. What a valid resource is is very much application dependent. The best way to keep the cache clean is to call delete resource on the cache when you find out that a resource is no longer up according to your applications definition of up. In this way you build a layer ontop of resource discovery that your application can rely on to present a clean cache. Make sense?


On Thu, Mar 27, 2014 at 8:18 AM, <> wrote:
I have configured heartbeating but dead resources do not seem to affect the cache.  When I kill a vm that hosted a local resource tuple, resource_discovery seems to pick up the loss after a heartbeat or two.  I can see this in the logs because "trade_resources, got remotes" stops listing that remote. 

However, when I call get_resources for that name, it still continues to return the dead resource in the list.  I cannot figure out how to get the cache to reflect the deletion.  I am calling sync_resources periodically but that doesn't seem to work.  

I'm sure there must be a simple way to get the list of only resources that are alive?


You received this message because you are subscribed to the Google Groups "erlware-questions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Martin Logan
Erlang & OTP in Action (Manning)
Reply all
Reply to author
0 new messages