Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-987

Expiration thread doesn't expire entires under the default configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • JDG 7.2 GA
    • JDG 7.1.0 GA
    • Server
    • None
    • Hide

      Write <expiration/> element explicitly.

                      <local-cache name="default">
                          <expiration/>
                      </local-cache>
      
      Show
      Write <expiration/> element explicitly. <local-cache name= " default " > <expiration/> </local-cache>
    • Hide

      1. Start out-of-the-box standalone server.
      2. To the default cache, do cache.put(key, value, 5, TimeUnit.SECONDS) using a Hot Rod client.
      3. Monitor number-of-entries by JConsole. It never becomes zero unless you access the key via API.

      Show
      1. Start out-of-the-box standalone server. 2. To the default cache, do cache.put(key, value, 5, TimeUnit.SECONDS) using a Hot Rod client. 3. Monitor number-of-entries by JConsole. It never becomes zero unless you access the key via API.

    Description

      I put an entry by cache.put(key, value, 5, TimeUnit.SECONDS) against an out-of-the-box JDG server, but the entry doesn't expire after the lifespan. Even after the expiration thread has ran (I confirmed by the following TRACE logging), it still exists in the cache.

      2017-05-16 15:16:29,432 TRACE [org.infinispan.expiration.impl.ExpirationManagerImpl] (pool-4-thread-1) Purging data container of expired entries
      2017-05-16 15:16:29,432 TRACE [org.infinispan.expiration.impl.ExpirationManagerImpl] (pool-4-thread-1) Purging data container completed in 0 milliseconds
      2017-05-16 15:16:29,655 TRACE [org.infinispan.expiration.impl.ExpirationManagerImpl] (pool-4-thread-1) Purging data container of expired entries
      2017-05-16 15:16:29,655 TRACE [org.infinispan.expiration.impl.ExpirationManagerImpl] (pool-4-thread-1) Purging data container completed in 0 milliseconds
      2017-05-16 15:16:29,682 TRACE [org.infinispan.expiration.impl.ExpirationManagerImpl] (pool-4-thread-1) Purging data container of expired entries
      2017-05-16 15:16:29,684 TRACE [org.infinispan.expiration.impl.ExpirationManagerImpl] (pool-4-thread-1) Purging data container completed in 0 milliseconds
      

      The existence of the entry is checked by number-of-entries attribute using JConsole. An API access like cache.get() or cache.size() can't be used for this test because it check the expiration in the Hot Rod thread, not in the expiration thread.

      After adding <expiration/> in the configuration file, the expiration thread works as expected. But the default interval is 60000 milliseconds, not 5000 milliseconds which is written in $JDG_HOME/docs/schema/jboss-infinispan-core_8_4.xsd.

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            rhn-support-onagano Osamu Nagano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: