]
William Burns updated ISPN-7696:
--------------------------------
Status: Open (was: New)
RemoveExpired could be called with updated value
------------------------------------------------
Key: ISPN-7696
URL:
https://issues.jboss.org/browse/ISPN-7696
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.0.0.Final
Reporter: Radim Vansa
Assignee: William Burns
In {{ClusterExpirationManager.handleLifespanExpireEntry}} the value for {{removeExpired}}
is retrieved in the {{Runnable}}, which is not executed under synchronized
block. There is a comment in CEM.handleInMemoryExpiration about the need
for synchronization, but it seems to me that the Cache.removeExpired
does not get the value we're checking the metadata for - there is a
window when the value can change after we've checked the expiration.
The value should stored in local variable while under synchronization, and captured in
the Runnable/lambda.