[
https://issues.jboss.org/browse/ISPN-5937?page=com.atlassian.jira.plugin....
]
Dan Berindei commented on ISPN-5937:
------------------------------------
I have managed to reproduce the test reliably by forcing it to run on a single core
({{taskset -c 1 mvn test -pl client/hotrod-client -Dtest=ExpiryTest}}).
There seem to be 2 problems:
1. {{RemoveExpiredCommand}} only knows the key, the value, and the lifespan. Since all
test methods use the same keys and values, and the default lifespan, then a delayed
{{RemoveExpiredCommand}} deleting a newer value is a limitation that was known when Will
started implementing cluster-wide expiration. On the other hand, HotRod uses versions, so
{{RemoveExpiredCommand}} should also check the versions to make sure it's removing the
correct value.
2. {{ClusterExpirationManager}} doesn't always create the {{RemoveExpiredCommand}}
with the proper value, because {{ClusterExpirationManager.handleLifespanExpired}}
doesn't lock the entry and the value is actually read in the async thread. This allows
another thread to modify the value in the data container *and* in the entry that was
passed to the async thread, before the {{RemoveExpiredCommand}} was created.
HotRod client ExpiryTest.testGlobalExpiryPutWithFlag random failures
--------------------------------------------------------------------
Key: ISPN-5937
URL:
https://issues.jboss.org/browse/ISPN-5937
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Server
Affects Versions: 8.1.0.Beta1
Reporter: Dan Berindei
Priority: Critical
Labels: testsuite_stability
Fix For: 8.2.0.Alpha1
The put operation succeeds, but the get immediately afterwards doesn't find the
entry:
{noformat}
java.lang.AssertionError: expected:<v1> but was:<null>
at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:101)
at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:108)
at
org.infinispan.client.hotrod.ExpiryTest.expectCachedThenExpired(ExpiryTest.java:103)
at
org.infinispan.client.hotrod.ExpiryTest.expectExpiryAfterRequest(ExpiryTest.java:99)
at
org.infinispan.client.hotrod.ExpiryTest.testGlobalExpiryPutWithFlag(ExpiryTest.java:46){noformat}
http://ci.infinispan.org/viewLog.html?buildId=31770&tab=buildResultsD...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)