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

Expiration thread doesn't expire entires under the default configuration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: JDG 7.1.0 GA
    • Fix Version/s: JDG 7.2 GA
    • Component/s: Server
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      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.
    • Workaround Description:
      Hide

      Write <expiration/> element explicitly.

                      <local-cache name="default">
                          <expiration/>
                      </local-cache>
      

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

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  william.burns William Burns
                  Reporter:
                  osamu.nagano Osamu Nagano
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: