"ISPN000025: wakeUpInterval is <= 0, not starting expired purge thread" when enabling query cache in JBoss EAP

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.3
  • Hibernate 5.3 (JPA)
  • Infinispan 9.4

Issue

  • In persistence.xml added the below to enable query cache

    <property name="hibernate.cache.use_query_cache" value="true"/>
    
  • During deployment, the message below is logged

    ... INFO  [org.infinispan.expiration.impl.ExpirationManagerImpl] (<THREAD_ID_HERE>) ISPN000025: wakeUpInterval is <= 0, not starting expired purge thread
    

Resolution

  • The message can be ignored as content of the timestamps cache should not be independently timed-out/reaped so no purge thread is required.
  • There is an open issue to address this in a future release1.

Root Cause

  • This is a side effect enabling query cache which has a corresponding timestamps cache (with default configuration). Timestamps will be scoped to the lifetime of result sets in the query cache and do not require independent life cycle management.
  • Note that the upstream/community documentation for Hibernate Content from docs.jboss.org is not included.recommends that the timestamps cache for query caching not be explicitly configured for timeout/expiration.

Diagnostic Steps

Used the Byteman rules below to identify the cache region associated with the event

RULE org.infinispan.expiration.impl.ExpirationManagerImpl.start
CLASS org.infinispan.expiration.impl.ExpirationManagerImpl
METHOD start
IF $0.configuration.expiration().wakeUpInterval() <= 0
DO traceStack("[BMAN] ExpirationManagerImpl.start() configuration=" + $0.configuration + ")\n", 25);
ENDRULE

RULE org.infinispan.cache.impl.CacheImpl.start
CLASS org.infinispan.cache.impl.CacheImpl
METHOD start
IF true
DO System.out.println("[BMAN] CacheImpl.start for " + $0.getName());
ENDRULE
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.