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

QueryCache is created after each getQueryCache call #12814

TomaszGaweda opened this issue Apr 10, 2018 · 1 comment

QueryCache is created after each getQueryCache call #12814

TomaszGaweda opened this issue Apr 10, 2018 · 1 comment


Copy link

@TomaszGaweda TomaszGaweda commented Apr 10, 2018


Recently I've submitted the issue about OOM in Hazelcast 3.10. This ticket is a follow-up, because we found where Hazelcast leaks memory.

In commit 918c9f3, @ahmetmircik changed that Query Cache is created by Cache ID, not Cache Name. Cache ID is generated randomly in method MapProxyImpl#getQueryCacheInternal.

So, after each call to getQueryCache, Hazelcast creates new query cache and populates it.

From IMap.getQueryCache:

Returns corresponding {@code QueryCache} instance for the supplied {@code name} or null. If there is a previously created {@link QueryCache} with the supplied {@code name} or if a declarative
configuration exists for the supplied {@code name} this method returns or creates the instance respectively, otherwise returns null.

So we have 2 possibilities:

  • Java Doc is wrong
  • Code does not work as expected
Copy link

@ahmetmircik ahmetmircik commented Apr 10, 2018

definitely this is a bug, thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.