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

ClusteredCacheFactory.isSeniorClusterMember() incorrectly returns false #1

GregDThomas opened this issue Jan 9, 2019 · 0 comments


None yet
1 participant
Copy link

commented Jan 9, 2019

There is a small window of in-opportunity where ClusteredCacheFactory.isSeniorClusterMember() can return false when the node is actually the senior member.

Although in theory this can only last a few CPU cycles, in practice because these CPU cycles are also used to fire the ClusterEventListener#joinedCluster() event it can be very misleading.

GregDThomas added a commit to GregDThomas/openfire-hazelcast-plugin that referenced this issue Jan 9, 2019

Fix issue igniterealtime#1
The ClusteredCacheFactory.isSeniorClusterMember() was returning false
because the clusterListener was null. The clusterListener was null
because the joinedCluster() event was being fired in the constructor of
the ClusterListener.

This fix moves the code that joins the cluster (and fires the event)
outside of the constructor, and calls it explicitly after the clusterListener
has been assigned.

@GregDThomas GregDThomas added this to the 2.4.0 milestone Jan 10, 2019

GregDThomas added a commit that referenced this issue Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.