[infinispan-issues] [JBoss JIRA] Commented: (ISPN-1137) Locking optimization: only lock main data owner (dist only)

Mircea Markus (JIRA) jira-events at lists.jboss.org
Wed May 25 07:09:00 EDT 2011


    [ https://issues.jboss.org/browse/ISPN-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604266#comment-12604266 ] 

Mircea Markus commented on ISPN-1137:
-------------------------------------

Paul Romano suggested a scenario that would cause inconsistencies:

N3: receives T1, acquires lock on c, reply positively to the prepare to N1
N3: receives T2, blocks on lock acquisition on c
N1: receives positive reply on reply for T1, broadcasts commit message for T1 to N3, N4 .... but the message to N4 gets delayed ...
N3: receives commit message for T1, writes back c<-T1, unblocks T2, replies positively for T2' s prepare to N2
N2: receives positive reply on reply for T2, broadcasts commit msg for T2 to N3, N4
N4: receives commit message for T2 (before that for T1), writes back c<-T2
N4: receives commit message for T1, writes back c<-T1,
N3: receives commit message for T2, writes back c<-T2

and in the end N3,N4 apply in different order the writes on c, ending up in inconsistent states (N3 has c=T2, N4 has c=T1).
In order to fix this, you could force causality order in the delivery of the commit messages (that trigger the writeback), which could be trackable using vector clocks.


> Locking optimization: only lock main data owner (dist only)
> -----------------------------------------------------------
>
>                 Key: ISPN-1137
>                 URL: https://issues.jboss.org/browse/ISPN-1137
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Transactions
>    Affects Versions: 4.2.1.FINAL
>            Reporter: Mircea Markus
>            Assignee: Manik Surtani
>              Labels: optimization
>
> Detailed here, as the 4th improvement: http://community.jboss.org/wiki/PossibleLockingImprovements
> As without ISPN-1131 locks are being acquired as the transaction progresses this optimization makes more sense after having ISPN-1131 in place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list