Problem with expiration in Infinispan
camaione Jun 11, 2012 10:53 AMHi all,
I have a problem with parameters of expiration in Infinispan.
I have this environment:
1. JDK 1.6.0_26
2. Infinispan 5.1.4.FINAL
3. Distributed Cache without persistent storage
4. Client - Server Topology (Hot Rod)
Configuration of the server is the following:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global>
<globalJmxStatistics enabled="true" jmxDomain="org.infinispan" cacheManagerName="SampleCacheManager" />
<transport clusterName="AVS-infinispan-cluster" machineId="m1" nodeName="m1-Node-A">
<properties>
<property name="configurationFile" value="jgroups-udp.xml" />
</properties>
</transport>
</global>
<namedCache name="AVSBeCache">
<eviction maxEntries="5000" strategy="LRU" />
<expiration wakeUpInterval="60000" lifespan="-1" maxIdle="120000" />
<jmxStatistics enabled="true" />
<clustering mode="distribution">
<async />
<hash numOwners="2" rehashWait="120000" rehashRpcTimeout="600000"/>
<l1 enabled="false" />
</clustering>
</namedCache>
</infinispan>
After a put operation of a key, I wait more 2 mins but the entry doesn't expire (get operation return the key).
I have monitored the nodes with the JConsole and I see numberEntries always different from 0.
I have set the level log of org.infinispan package to TRACE and I have find this message in the server log (in detail red bold)
2012-06-11 20:49:13,792 TRACE (OOB-3,BeeTVHiveHivePlus-58305) [org.infinispan.interceptors.InvocationContextInterceptor] Invoked with command PutKeyValueCommand{key=webportal204-38224, value=192.168.7.204:11222, flags=[CACHE_MODE_LOCAL, SKIP_LOCKING, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, SKIP_SHARED_CACHE_STORE, SKIP_OWNERSHIP_CHECK], putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1} and InvocationContextSingleKeyNonTxInvocationContext{flags=[CACHE_MODE_LOCAL, SKIP_LOCKING, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, SKIP_SHARED_CACHE_STORE, SKIP_OWNERSHIP_CHECK]}]
2012-06-11 20:49:13,794 TRACE (OOB-3,BeeTVHiveHivePlus-58305) [org.infinispan.interceptors.CallInterceptor] Executing command: PutKeyValueCommand{key=webportal204-38224, value=192.168.7.204:11222, flags=[CACHE_MODE_LOCAL,SKIP_LOCKING, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, SKIP_SHARED_CACHE_STORE, SKIP_OWNERSHIP_CHECK], putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1}.
2012-06-11 20:49:13,810 TRACE (InfinispanServer-Main) [org.infinispan.interceptors.InvocationContextInterceptor] Invoked with command PutKeyValueCommand{key=BeeTVHiveHivePlus-58305, value=192.168.7.82:11222, flags=null, putIfAbsent=false,lifespanMillis=-1, maxIdleTimeMillis=-1} and InvocationContext [SingleKeyNonTxInvocationContext{flags=null}]
2012-06-11 20:49:13,820 TRACE (InfinispanServer-Main) [org.infinispan.interceptors.CallInterceptor] Executing command: PutKeyValueCommand{key=BeeTVHiveHivePlus-58305, value=192.168.7.82:11222, flags=null, putIfAbsent=false, lifespanMillis=-1,maxIdleTimeMillis=-1}.
2012-06-11 20:49:13,820 TRACE (InfinispanServer-Main) [org.infinispan.remoting.rpc.RpcManagerImpl] BeeTVHiveHivePlus-58305 broadcasting call PutKeyValueCommand{key=BeeTVHiveHivePlus-58305, value=192.168.7.82:11222, flags=null,putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1} to recipient list null
2012-06-11 20:49:13,822 TRACE (InfinispanServer-Main) [org.infinispan.remoting.transport.jgroups.JGroupsTransport] dests=null, command=SingleRpcCommand{cacheName='___hotRodTopologyCache', command=PutKeyValueCommand{key=BeeTVHiveHivePlus-58305, value=192.168.7.82:11222, flags=null, putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1}}, mode=SYNCHRONOUS, timeout=10000
2012-06-11 20:49:13,822 TRACE (InfinispanServer-Main) [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] Replication task sending SingleRpcCommand{cacheName='___hotRodTopologyCache',command=PutKeyValueCommand{key=BeeTVHiveHivePlus-58305, value=192.168.7.82:11222, flags=null, putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1}} to single recipient webportal204-38224 with response mode GET_ALL
2012-06-11 20:49:13,826 TRACE (InfinispanServer-Main) [org.infinispan.remoting.rpc.RpcManagerImpl] Response(s) to SingleRpcCommand{cacheName='___hotRodTopologyCache', command=PutKeyValueCommand{key=BeeTVHiveHivePlus-58305,value=192.168.7.82:11222, flags=null, putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1}} is {webportal204-38224=null}
Why in the start of the server, lifespan and maxIdle are setting to value -1?
Thanks in advance and best regards.