[infinispan-issues] [JBoss JIRA] (ISPN-3124) AtomicHashMap.put is not atomic with pessimistic locking

Dan Berindei (JIRA) jira-events at lists.jboss.org
Mon May 20 09:12:06 EDT 2013


     [ https://issues.jboss.org/browse/ISPN-3124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Berindei updated ISPN-3124:
-------------------------------

    Workaround Description: Use {{AdvancedCache.lock}} to lock the atomic map key explicitly before modifying it.
                Workaround: Workaround Exists

    
> AtomicHashMap.put is not atomic with pessimistic locking
> --------------------------------------------------------
>
>                 Key: ISPN-3124
>                 URL: https://issues.jboss.org/browse/ISPN-3124
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core API
>    Affects Versions: 5.3.0.Beta1
>            Reporter: Dan Berindei
>            Assignee: Dan Berindei
>             Fix For: 5.3.0.CR1, 5.3.0.Final
>
>
> When the user calls {{AtomicHashMap.put(k, v)}}, {{AtomicHashMapProxy.getDeltaMapForWrite()}} first reads the atomic map in the invocation context, and only acquires a lock afterwards.
> Between the read and the lock, another transaction can write something to the atomic map, and that write will be lost.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list