-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
13.0.3.Final
The test does a expiredCache.withFlags(CACHE_MODE_LOCAL).get(key), advances the time services on all nodes, then does otherCache.withFlags(CACHE_MODE_LOCAL).get(key)}}.
A touch command is sent anyway, and when it's async, a touch command (touch 1) could be running on expiratedCache while the time service is advanced:
touch 1 reads the old time
time service advances
touch 2 reads the new time
touch 2 updates last acces w/ new time
touch 1 updates last access w/ old time
The lack of synchronization in touch commands is not normally a problem, because the production time service advances by really small increments, but in the test it advances by 5 minutes, and that fails the test.
13:30:14,207 TRACE (testng-Test:[]) [Test] Found key WrappedByteArray[\(9ACFBBEE07 (6 bytes)] for primary owner Cache 'defaultcache'@Test-NodeA and backup owner Cache 'defaultcache'@Test-NodeB 13:30:14,210 TRACE (testng-Test:[]) [InvocationContextInterceptor] Invoked defaultcache with command TouchCommand {key=WrappedByteArray[\(9ACFBBEE07 (6 bytes)], flags=[]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=null, lockOwner=null}] 13:30:14,210 TRACE (testng-Test:[]) [JGroupsTransport] Test-NodeA sending command to [Test-NodeA, Test-NodeB, Test-NodeC]: SingleRpcCommand{cacheName='defaultcache', command=TouchCommand {key=WrappedByteArray[\(9ACFBBEE07 (6 bytes)], flags=[]}} 13:30:14,211 TRACE (jgroups-6,Test-NodeB:[]) [JGroupsTransport] Test-NodeB received command from Test-NodeA: SingleRpcCommand{cacheName='defaultcache', command=TouchCommand {key=WrappedByteArray[\(9ACFBBEE07 (6 bytes)], flags=[]}} 13:30:14,211 TRACE (testng-Test:[]) [ControlledTimeService] Current time for Test-NodeB is now 2743000 13:30:14,211 TRACE (testng-Test:[]) [InvocationContextInterceptor] Invoked defaultcache with command TouchCommand {key=WrappedByteArray[\(9ACFBBEE07 (6 bytes)], flags=[]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=null, lockOwner=null}] 13:30:14,211 TRACE (testng-Test:[]) [CallInterceptor] Invoking: TouchCommand 13:30:14,211 TRACE (testng-Test:[]) [CallInterceptor] Entry was touched: true for key WrappedByteArray[\(9ACFBBEE07 (6 bytes)]. 13:30:14,212 TRACE (jgroups-6,Test-NodeB:[]) [CallInterceptor] Entry was touched: true for key WrappedByteArray[\(9ACFBBEE07 (6 bytes)]. 13:30:44,215 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed: org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.testMaxIdleExpiredOnPrimaryOwner[REPL_SYNC, tx=false, OFF_HEAP, touch=ASYNC] java.lang.AssertionError: expected:<2743000>, got:<2443000> at org.testng.AssertJUnit.fail(AssertJUnit.java:59) ~[testng-6.14.3.jar:?] at org.infinispan.test.AbstractInfinispanTest.eventually(AbstractInfinispanTest.java:237) ~[test-classes/:?] at org.infinispan.test.AbstractInfinispanTest.eventually(AbstractInfinispanTest.java:216) ~[test-classes/:?] at org.infinispan.test.AbstractInfinispanTest.eventuallyEquals(AbstractInfinispanTest.java:206) ~[test-classes/:?] at org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.assertLastUsedUpdate(ClusterExpirationMaxIdleTest.java:326) ~[test-classes/:?] at org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.testMaxIdleExpiredEntryRetrieval(ClusterExpirationMaxIdleTest.java:195) ~[test-classes/:?] at org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.testMaxIdleExpiredOnPrimaryOwner(ClusterExpirationMaxIdleTest.java:156) ~[test-classes/:?]
- is caused by
-
ISPN-13582 CACHE_MODE_LOCAL reads should not send touch commands
- New