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

Write skew check not detected in LOCAL mode when doing multiple modifications

XMLWordPrintable

      Using a local cache with optimistic locking, repeatable read and write skew check, two threads will concurrently execute a transaction that put() the same key. In this case write skew check is properly detected and only one is able to commit. If the two threads modify two keys no write skew check happens and both will commit. It turns out there is an optimization in OptimisticLockingInterceptor for single modification transactions. The write skew check is properly done on this code path but is not done for the code path that handles transactions with multiple modifications. More specifically, LockAcquisitionVisitor.performWriteSkewCheck is not invoked at all. Please have a look at WriteSkewTest.testCheckWriteSkewWithMultipleModifications() in the pull request that demonstrates the issue.

              anistor Adrian Nistor (Inactive)
              anistor Adrian Nistor (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: