[infinispan-issues] [JBoss JIRA] (ISPN-7696) RemoveExpired could be called with updated value

Radim Vansa (JIRA) issues at jboss.org
Tue Apr 4 02:48:00 EDT 2017


Radim Vansa created ISPN-7696:
---------------------------------

             Summary: 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.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list