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

IMap listener unregistered after two failover/failbacks #13004

Closed
agherardi opened this issue Apr 27, 2018 · 3 comments
Closed

IMap listener unregistered after two failover/failbacks #13004

agherardi opened this issue Apr 27, 2018 · 3 comments
Labels
Source: Community PR or issue was opened by a community user

Comments

@agherardi
Copy link
Contributor

I have a 2-node cluster using Hazelcast opensource 3.8. My app uses an IMap and registers both an entry listener and a partition lost listener. The code is as follows:
String reg = map.addEntryListener(hzListener, true); String partLostReg = map.addPartitionLostListener(hzListener);

After 2 failovers (consisting of unplugging the Ethernet cable from one of the nodes) and 2 failbacks (consists of re-plugging the Ethernet cable), the listener no longer fires one the node that was disconnected/reconnected.

I took a heap dump on both nodes and noticed that, on the node that was connected/disconnected, my listener was garbage collected - Eclipse MAT shows a count of 0 instances of the listener's class. The listener still exists on the other node.

Any suggestions?

@agherardi
Copy link
Contributor Author

Since it appears that topic and IMap listeners all end up registering with the event service, I'm wondering if this issue has the same root cause as #7742.

@agherardi
Copy link
Contributor Author

agherardi commented Apr 27, 2018

I compared the heap dumps of the "bad" and "good" nodes. On both nodes, I see 3 com.hazelcast.spi.impl.eventserver.impl.Registration objects for my IMap, 2 have a MapPartitionLostEventFilter, one has an EventListenerFilter. However the value of Registration.listener is null on the "bad" node and non-null on the "good" node.

If I understand correctly, Registration.listener is null for registrations from a remote node. Indeed, on the "bad" node the subscriber has the IP of the "good" node; while on the "good" node, the subscriber is its own IP.

@agherardi
Copy link
Contributor Author

This issue was caused by an application error.

@mmedenjak mmedenjak added the Source: Community PR or issue was opened by a community user label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Community PR or issue was opened by a community user
Projects
None yet
Development

No branches or pull requests

2 participants