Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-3124

AtomicHashMap.put is not atomic with pessimistic locking

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.3.0.Final
    • 5.2.7.Final, 5.3.0.Final
    • Core
    • None
    • Workaround Exists
    • Hide

      Use AdvancedCache.lock to lock the atomic map key explicitly before modifying it.

      Show
      Use AdvancedCache.lock to lock the atomic map key explicitly before modifying it.

      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.

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: