[infinispan-issues] [JBoss JIRA] (ISPN-8548) Clear post notifications can cause memory issues as it holds all entries locally

William Burns (JIRA) issues at jboss.org
Tue Nov 21 11:53:00 EST 2017


     [ https://issues.jboss.org/browse/ISPN-8548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Burns updated ISPN-8548:
--------------------------------
              Status: Pull Request Sent  (was: Coding In Progress)
    Git Pull Request: https://github.com/infinispan/infinispan/pull/5596


> Clear post notifications can cause memory issues as it holds all entries locally
> --------------------------------------------------------------------------------
>
>                 Key: ISPN-8548
>                 URL: https://issues.jboss.org/browse/ISPN-8548
>             Project: Infinispan
>          Issue Type: Bug
>    Affects Versions: 9.2.0.Beta1, 9.1.3.Final
>            Reporter: William Burns
>            Assignee: William Burns
>
> 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