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

BDBJE - Improve scaling/performance of expiration purging

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

XMLWordPrintable

      (This problem may apply to other cache storage solutions as well.)

      The expiration purge code iterates and loads the entire database to find expired entries, which is highly inefficient.

      protected void purgeInternal() throws CacheLoaderException {
      try {
      Iterator<Map.Entry<Object, InternalCacheEntry>> i = cacheMap.entrySet().iterator();
      while (i.hasNext())

      { if (i.next().getValue().isExpired()) i.remove(); }

      Should maintain a separate time -> key association. BDB-JE has a "StoredSortedMap", so this should be straightforward to use. (See how JDBM handles eviction.)

              adriancole_jira Adrian Cole (Inactive)
              genman_jira Elias Ross (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: