WildFly 10 distributed cache does not sync
munetsi Jun 16, 2016 4:55 PMHi,
I recently upgraded to WildFly 10.0.0.Final from 9.0.2 and my manually configured distributed caches are no longer syncing. I am running in domain mode with two backend servers (ha profile, ha sockets). For some reason Infinispan thinks the cache is local (i.e newly inserted keys are not seen on the other nodes). What is interesting is that he "web" cache container appears to be syncing across the nodes as expected. The manually configured container is a copy of the "web" cache container with the name attribute changed (see below), so one would expect it to behave the same.
<cache-container name="FAAR" default-cache="dist">
<transport lock-timeout="60000"/>
<distributed-cache name="dist" mode="ASYNC" owners="2" l1-lifespan="0">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
<file-store/>
</distributed-cache>
</cache-container>
From my research into the issue, it appears that the correct Infinispan interceptors are not being applied to the manually configured distributed cache. Below is the interceptor list for the "web" container that syncs versus the cache container which does not sync.
web cache container:
2016-06-16 10:23:02,058 DEBUG [org.infinispan.interceptors.InterceptorChain] (ServerService Thread Pool -- 62) Interceptor chain size: 12
2016-06-16 10:23:02,058 DEBUG [org.infinispan.interceptors.InterceptorChain] (ServerService Thread Pool -- 62) Interceptor chain is:
>> org.infinispan.interceptors.distribution.DistributionBulkInterceptor
>> org.infinispan.interceptors.InvocationContextInterceptor
>> org.infinispan.statetransfer.StateTransferInterceptor
>> org.infinispan.statetransfer.TransactionSynchronizerInterceptor
>> org.infinispan.interceptors.TxInterceptor
>> org.infinispan.interceptors.locking.PessimisticLockingInterceptor
>> org.infinispan.interceptors.NotificationInterceptor
>> org.infinispan.interceptors.GroupingInterceptor
>> org.infinispan.interceptors.EntryWrappingInterceptor
>> org.infinispan.interceptors.ClusteredActivationInterceptor
>> org.infinispan.interceptors.distribution.TxDistributionInterceptor
>> org.infinispan.interceptors.CallInterceptor
2016-06-16 10:23:02,066 DEBUG [org.infinispan.jmx.JmxUtil] (ServerService Thread Pool -- 62) Object name jboss.infinispan:type=Cache,name="test-sessions-cache.war(dist_async)",manager="web",component=Cache already registered
FAAR cache container:
2016-06-16 10:23:19,349 DEBUG [org.infinispan.interceptors.InterceptorChain] (default task-3) Interceptor chain size: 5
2016-06-16 10:23:19,349 DEBUG [org.infinispan.interceptors.InterceptorChain] (default task-3) Interceptor chain is:
>> org.infinispan.interceptors.InvocationContextInterceptor
>> org.infinispan.interceptors.CacheMgmtInterceptor
>> org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor
>> org.infinispan.interceptors.EntryWrappingInterceptor
>> org.infinispan.interceptors.CallInterceptor
2016-06-16 10:23:19,351 DEBUG [org.infinispan.jmx.JmxUtil] (default task-3) Object name jboss.infinispan:type=Cache,name="dist(local)",manager="FAAR",component=Cache already registered
You can also see from the line above that Infinispan considers the cache to be local. This behavior does not occur in WildFly 9.0.2 using the same configuration, all of the distributed caches sync without issue.
Please advise.