Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8548

Clear post notifications can cause memory issues as it holds all entries locally

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.1.4.Final, 9.2.0.Final
    • 9.1.3.Final, 9.2.0.Final
    • None
    • None

      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

      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);
      }
      

              wburns@redhat.com Will Burns
              wburns@redhat.com Will Burns
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: