[
https://issues.jboss.org/browse/ISPN-6051?page=com.atlassian.jira.plugin....
]
Dan Berindei commented on ISPN-6051:
------------------------------------
The missing locking is causing some of the failures in the client {{ExpiryTest}}. The test
only allows entries to expire after the update, i.e. when they have value
{{[B0x033e027631}}. But the log below shows how a {{RemovedExpiredCommand}} is created
with value {{[B0x033e027630}} after the next test method updates the value:
{noformat}
09:41:06,627 INFO (testng-ExpiryTest:) [UnitTestTestNGListener] Starting test
testGlobalExpiryReplaceWithVersion(org.infinispan.client.hotrod.ExpiryTest)
09:41:06,636 TRACE (HotRodServerWorker-3-1:) [ReadCommittedEntry] Updating entry
(key=[B0x034b00000001 removed=false valid=true changed=true created=true
value=[B0x033e027630 metadata=EmbeddedExpirableMetadata{lifespan=6000, maxIdle=-1,
version=NumericVersion{version=4294967307}},
providedMetadata=EmbeddedExpirableMetadata{lifespan=6000, maxIdle=-1,
version=NumericVersion{version=4294967307}})
09:41:06,654 TRACE (HotRodServerWorker-3-1:) [ReadCommittedEntry] Updating entry
(key=[B0x034b00000001 removed=false valid=true changed=true created=false
value=[B0x033e027631 metadata=EmbeddedExpirableMetadata{lifespan=6000, maxIdle=-1,
version=NumericVersion{version=4294967308}},
providedMetadata=EmbeddedExpirableMetadata{lifespan=6000, maxIdle=-1,
version=NumericVersion{version=4294967308}})
09:41:06,670 INFO (testng-ExpiryTest:) [UnitTestTestNGListener] Test
testGlobalExpiryReplaceWithVersion(org.infinispan.client.hotrod.ExpiryTest) succeeded.
09:41:06,671 INFO (testng-ExpiryTest:) [UnitTestTestNGListener] Starting test
testGlobalExpiryReplaceWithVersionFlag(org.infinispan.client.hotrod.ExpiryTest)
09:41:06,673 TRACE (HotRodServerWorker-3-1:) [ReadCommittedEntry] Updating entry
(key=[B0x034b00000001 removed=false valid=true changed=true created=true
value=[B0x033e027630 metadata=EmbeddedExpirableMetadata{lifespan=6000, maxIdle=-1,
version=NumericVersion{version=4294967309}},
providedMetadata=EmbeddedExpirableMetadata{lifespan=6000, maxIdle=-1,
version=NumericVersion{version=4294967309}})
09:41:06,688 TRACE (async-thread-ExpiryTestNodeA-p5-t4:) [InvocationContextInterceptor]
Invoked with command RemoveExpiredCommand{key=[B0x034b00000001, value=[B0x033e027630,
lifespan=6000} and InvocationContext
[org.infinispan.context.SingleKeyNonTxInvocationContext@6a76fe4b]
{noformat}
ClusterExpirationManager missing locking
----------------------------------------
Key: ISPN-6051
URL:
https://issues.jboss.org/browse/ISPN-6051
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.1.0.Final
Reporter: Dan Berindei
Assignee: William Burns
Fix For: 8.2.0.Alpha1
Because {{ClusterExpirationManager.handleLifespanExpired()}} doesn't lock the entry
and the value is actually read in the async thread, the created {{RemoveExpiredCommand}}
sometimes uses a newer value written by another thread.
Could be fixed by using {{DataContainer.compute()}} to check expiration and create the
{{RemoveExpirationCommand}}.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)