Nodes joining the cluster before finished starting up

19 views
Skip to first unread message

sean...@ebay.com

unread,
Jun 8, 2017, 3:00:24 AM6/8/17
to Hazelcast
Hi!

I'm was having trouble with how to solve a race condition between the starting of a node and the triggering of a MembershipListener method. When I start up a node, I set an attribute on that node and in my MembershipListener, I need to access that attribute. However, when I start up a new node, it looks like the MembershipListener method gets triggered and executed before the new node finishes starting up. This causes a NPE in my MembershipListener method because the attribute hasn't been set yet in the new node, which leads me to a question. Why do nodes join a clustering before they are done starting up? Is there a use case in which this is beneficial? Why not join the cluster after the node is done starting up?

Thanks,
Sean

ih...@hazelcast.com

unread,
Jun 8, 2017, 5:29:12 AM6/8/17
to Hazelcast
I believe there is the time consuming migration process, that is why. Can you share the code where you get NPE? 
Reply all
Reply to author
Forward
0 new messages