[infinispan-issues] [JBoss JIRA] (ISPN-8931) Clear post notifications can cause memory issues as it holds all entries locally
William Burns (JIRA)
issues at jboss.org
Mon Mar 12 09:07:00 EDT 2018
William Burns created ISPN-8931:
-----------------------------------
Summary: Clear post notifications can cause memory issues as it holds all entries locally
Key: ISPN-8931
URL: https://issues.jboss.org/browse/ISPN-8931
Project: Infinispan
Issue Type: Bug
Affects Versions: 9.1.3.Final, 9.2.0.Beta1
Reporter: William Burns
Assignee: William Burns
Fix For: 9.1.4.Final, 9.2.0.Beta2
Currently clear iterates over the container and stores all entries before finally invoking clear. This can cause memory issues especially for off heap as we don't want to have all of these entries in the JVM heap at the same time.
Something like
{code}
Iterator<InternalCacheEntry<Object, Object>> iterator =
dataContainer.iterator();
while (iterator.hasNext()) {
InternalCacheEntry entry = iterator.next();
iterator.remove();
notifier.notifyCacheEntryRemoved(entry.getKey(), entry.getValue(),
entry.getMetadata(), false, context, command);
}
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the infinispan-issues
mailing list