Bug #9749 Transactions causes deadlock in ACC
Submitted: 8 Apr 2005 10:14 Modified: 25 Apr 2005 11:04
Reporter: Johan Andersson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.0.3 OS:Any (*)
Assigned to: Jonas Oreland CPU Architecture:Any

[8 Apr 2005 10:14] Johan Andersson
Description:
T1 times out after TransactionDeadlockDetectionTimeout if executing two transactions as follows:
BEGIN T1                               BEGIN T2
T1(READ X)                             T2(READ X)              
NO_COMMIT (to get value)    NO_COMMIT (to get value X)   -- shared lock is taken by both operations
T1(WRITE X)   
                                               COMMIT T2    --release shared lock
COMMIT T1                            

How to repeat:
BEGIN T1                               BEGIN T2
T1(READ X)                             T2(READ X)              
NO_COMMIT (to get value)    NO_COMMIT (to get value)            -- shared lock is taken by both operations
T1(WRITE X)   
                                                 COMMIT T2    --release shared lock
COMMIT T1                            

Suggested fix:
Move T1(WRITE X) from serial queue to parallel queue, when T2 has committed.
[8 Apr 2005 11:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23796
[8 Apr 2005 13:36] Martin Skold
Since you already have a pending patch I assign it to you
[13 Apr 2005 7:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23943
[14 Apr 2005 8:51] Johan Andersson
When will the review be done?
[19 Apr 2005 11:33] Jonas Oreland
patch towards 5.0

Attachment: patch.txt (text/plain), 9.62 KiB.

[25 Apr 2005 9:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24278