-
Bug
-
Resolution: Obsolete
-
Major
-
JDG 7.1.0 GA
-
None
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.