-
Notifications
You must be signed in to change notification settings - Fork 580
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
Memory leak when using Eh107CacheManager.getCacheNames() #3229
Comments
Hi, I am upgrading net.sf.ehcache ehcache from 2.10.6 to org.ehcache ehcache with 3.10.8 jakarta as classifier. Is there any alternative get all the cache names if it creating memory leak issue? In old code, we using below these attributes to display healthcheck of cache. What are alternative in 3.10.8. I could get few attributes but not all. Is there any doc/example which can help me? Any help on this appreciated. Thanks, |
Hi @pbaddi,
We are using the following code
|
Hello,
There seems to be a memory leak
when using Eh107CacheManager.getCacheNames()
in EhCache version 3.9.6:
Each time Eh107CacheManager.getCacheNames() is invoked
the collections of "derivedStatistics" is increasing
which seems like a bug?
Please see the attached sample code which demonstrates this.
It looks like a possible solution to this problem
maybe to change "caches.putIfAbsent()" to "caches.computeIfAbsent()" in refreshAllCaches()
to avoid unnecessarily invoking wrapEhcacheCache().
Thanks.
ehcachetest.zip
The text was updated successfully, but these errors were encountered: