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

BdbjeCacheStore purges all mortal entries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 4.2.0.CR1
    • 4.2.0.BETA1
    • Loaders and Stores
    • None
    • Low

      purgeInternal in class BdbjeCacheStore uses tailMap on map of expire time of entries. The SortedStoredMap expiryMap uses SerialBinding so entries are sorted by expire time (SerialBinding --> DataOutputStream --> writeLong)

      Due to javadoc of tailMap it returns all entries with expire time greater than System.currentTimeMillis()
      "Returns a view of the portion of this sorted map whose elements are strictly greater than fromKey, optionally including fromKey."

      But all entries which expire in future have an expire time greater than System.currentTimeMillis().
      I guess headMap should be used instead of tailMap

            manik_jira Manik Surtani (Inactive)
            theunique89 Frank Knorr (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: