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

When LockControlCommand fails on an owner, the rollback command is not sent

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Done
    • 5.2.7.Final, 5.3.0.Final, 6.0.0.Beta1
    • 6.0.0.Final
    • Transactions

    Description

      If a transaction starts with a lock() operation and the lock fails on one of the owners (e.g. because of a SuspectException), the rollback command should still be sent to all the live owners.

      However, because a locked key is only registered in the affectedKeys collection after a successful lock operation (in PessimisticLockingInterceptor.acquireRemoteIfNeeded(), the rollback command is not sent to any owners.

      This is in a pessimistic cache. However, looking at the OptimisticLockingInterceptor.acquireAllLocks() code I think I see a similar problem: it's possible that a key is locked, but the write skew check fails and the key is not added to the affectedKeys collection. We should always register the key first and attempt to lock it after.

      Attachments

        Issue Links

          Activity

            People

              pruivo@redhat.com Pedro Ruivo
              dberinde@redhat.com Dan Berindei
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: