[infinispan-issues] [JBoss JIRA] (ISPN-3419) Write Skew check must be performed only in the primary owner

Pedro Ruivo (JIRA) jira-events at lists.jboss.org
Mon Aug 19 13:01:26 EDT 2013


Pedro Ruivo created ISPN-3419:
---------------------------------

             Summary: Write Skew check must be performed only in the primary owner
                 Key: ISPN-3419
                 URL: https://issues.jboss.org/browse/ISPN-3419
             Project: Infinispan
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 6.0.0.Alpha2
            Reporter: Pedro Ruivo
            Assignee: Pedro Ruivo
             Fix For: 6.0.0.Alpha3


The following case can create data inconsistency:

A: txA reads k with version v1 and writes on k (say valueA)
primary-owner of k: txA acquire lock on k, validates and return v2 (increment(v1))
non-primary-onwer of k: txA registers a backup lock, validates and returns v2 (increment(v1))

A: txA commits with version v2.
primary-owner of k: applies txA //commit in the non-primary-owner is delayed

B: txB remote reads k with version v2 and writes on k (say valueB) and prepare the transaction
primary-owner of k: txB waits until the lock is relased.
non-primary-onwer of k: txA registers a backup lock, validates and returns v2 (increment(v1), because it has not applied the txA)

primary-owner of k: lock is release, txB is validated and it return v3 (increment(v2))


B collects all the response and merge them. However, the map.value() can return first the response from primary-owner (v3) and them the response from the non-primary-owner (v2). The result version map will be k=>v2.

txB will update k with the same previous version and a different value. from here the data will become inconsistent. 

--
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