How to tell when all riak_core vnodes are up?

Will Hutchinson will at trueex.com
Mon Jun 4 15:51:41 EDT 2012


Hi, we are using riak_core and our own custom vnode type (call it foo) that
implements the riak_core_vnode behaviour.

We are seeing the following:

1) We start up in our supervisor a processes called foo_vnode_master that
uses the riak_core_vnode_master module
2) After the supervisor has started all its processes, in our application's
start we call riak_core:register(foo, [{vnode_module, foo_vnode}])
3) Shortly after that I need to send an asynchronous command to all of our
32 vnodes

The problem: Not all of the vnode processes have been created and
initialized yet.

How can I reliably tell whether all of our vnode processes have been
created? I've tried a variety of riak_core_status and riak_core_ring
functions and not found anything that seems to return what I need.

The best I can see at this point is to
call riak_core_vnode_manager:all_vnodes(foo_vnode) until I get back a list
of length 32.

Thanks,
Will Hutchinson

-- 
 

*CONFIDENTIALITY NOTICE*

THE INFORMATION CONTAINED IN THIS COMMUNICATION IS INTENDED FOR THE NAMED 
RECEIVER ONLY. THE TRANSMISSION MAY CONTAIN PRIVILEGED AND CONFIDENTIAL 
MATERIAL. IF YOU ARE NOT THE NAMED RECIPIENT, PLEASE BE ADVISED THAT ANY 
USE, DISSEMINATION OR UNAUTHORIZED COPYING OF THE MATERIAL IS STRICTLY 
PROHIBITED. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY 
SUPPORT at TRUEEX.COM AND DESTROY THE RECEIVED COPY. THANK YOU.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120604/2664a369/attachment.html>


More information about the riak-users mailing list