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

Eviction with passivation introduces a race where entries are invisible to callers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 4.1.0.CR3
    • 4.1.0.CR2
    • Eviction
    • None
    • Hide

      Test case attached

      Show
      Test case attached
    • High

    Description

      Setup a simple case with a cacheloader set with passivation enabled and and eviction policy of LRU and max enteries 1

      -Put first value to cache
      -Put second value to the cache
      -Eviction runs
      org.infinispan.interceptors.PassivationInterceptor#visitEvictCommand attempts to passivate the first value but dataContainer.get(key); returns NULL as it appears the value has already been removed from the data container, which is then passed into the cache store resulting in the NPE

      Behaviour is subtly different if EvictionThreadPolicy.DEFAULT is used as the NPE is not immediately obvious but the operation still fails

      With EvictionStrategy.LIRS similar issues arrise, the bug is not apparent on the second put operation but when get is executed NULL is returned

      This only seems to occur with Passivation enabled

      I encountered this when making heavy use of Lucene InfinispanDirectory and traced it through to this issue.

      Attachments

        Activity

          People

            manik_jira Manik Surtani (Inactive)
            paulnardone Paul Nardone (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: