Re: resource discovery and dead resources

3 views
Skip to first unread message

Martin Logan

unread,
Mar 27, 2014, 7:49:46 PM3/27/14
to erlware-...@googlegroups.com
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?

Cheers,
Martin


On Thu, Mar 27, 2014 at 8:18 AM, <afran...@gmail.com> 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?

Thanks, 

--
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 erlware-questi...@googlegroups.com.
To post to this group, send email to erlware-...@googlegroups.com.
Visit this group at http://groups.google.com/group/erlware-questions.
For more options, visit https://groups.google.com/d/optout.



--
Martin Logan
Erlang & OTP in Action (Manning) http://manning.com/logan
Reply all
Reply to author
Forward
0 new messages