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

BDBJE - Improve scaling/performance of expiration purging

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)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: