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

client.getDistributedObjects can cause recreation of destroyed objects #14571

Closed
cangencer opened this issue Feb 25, 2019 · 0 comments · Fixed by #16017
Closed

client.getDistributedObjects can cause recreation of destroyed objects #14571

cangencer opened this issue Feb 25, 2019 · 0 comments · Fixed by #16017

Comments

@cangencer
Copy link
Contributor

@cangencer cangencer commented Feb 25, 2019

Currently client.getDistributedObjects() can cause destroyed objects to be re-created. This is because it attemps to create proxies it doesn't know about after getting a list from a member, however member might have destroyed the proxy meanwhile.

Reproducer:

HazelcastInstance instance = Hazelcast.newHazelcastInstance();
HazelcastInstance client = HazelcastClient.newHazelcastClient();
new Thread(() -> {
    while (true) {
        System.out.println(client.getDistributedObjects());
        try {
            Thread.sleep(250);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}).start();
for (int i = 0; i < 100_000; i++) {
    IMap<Object, Object> map = instance.getMap("map-" +i);
    map.put(1,1);
    map.destroy();
}
System.out.println("done");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.