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

Cache entry not evicted from memory on IBM JDK when another entry was loaded from a cache loader and maxEntries had been reached


    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 5.1.0.FINAL
    • Eviction
    • None

      This behavior is specific to IBM JDK (I tried JDK6 and 7), it works fine with Java HotSpot.

      Steps to reproduce the problem:

      1) set maxEntries for eviction to 2 and algorithm e.g. to LRU
      2) store 3 entries key1, key2, key3 to the cache (after that you can see that the cache contains only 2 entries - key2 and key3, the first one was evicted from memory)
      3) call cache.get("key1")
      4) PROBLEM - cache contains all key1, key2, key3 even though it should contain only 2 entries - only happens with IBM JDK (6 or 7 ..no matter)

      I'll shortly issue a pull request with a test to ispn-core

            ttarrant@redhat.com Tristan Tarrant
            mgencur Martin Gencur
            1 Vote for this issue
            5 Start watching this issue