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

ClientMap and ClientReplicatedMap share the same near cache when they have identical names #15912

mdumandag opened this issue Oct 31, 2019 · 0 comments


Copy link

@mdumandag mdumandag commented Oct 31, 2019

As the title says, when client map and replicated map have the same name and if the near cache is on, they share the same near cache, causing an entry accessed from a map to be accessible from replicated map(or vice versa). See the following reproducer. It outputs b.

        HazelcastInstance hz = Hazelcast.newHazelcastInstance();

        ClientConfig config = new ClientConfig();
        config.addNearCacheConfig(new NearCacheConfig("test"));
        HazelcastInstance client = HazelcastClient.newHazelcastClient(config);

        IMap<String, String> map = client.getMap("test");
        ReplicatedMap<String, String> rmap = client.getReplicatedMap("test");

        map.put("a", "b");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.