Bug #42828 | Falcon crash in Table::checkUniqueRecordVersion - transaction = 0x0 | ||
---|---|---|---|
Submitted: | 13 Feb 2009 12:40 | Modified: | 15 May 2009 15:10 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S1 (Critical) |
Version: | 6.0-falcon-team | OS: | Any |
Assigned to: | Kevin Lewis | CPU Architecture: | Any |
Tags: | F_RECORD TREE |
[13 Feb 2009 12:40]
Philip Stoev
[14 Feb 2009 17:02]
Kevin Lewis
The code that fails is this; if (state == Active) { // This pending record is not a duplicate but an older version is. // Only wait on this record if the duplicate is visible or pending // at a savepoint. if (!activeTransaction) { activeTransaction = dup->getTransaction(); activeTransaction->addRef(); <== crashed here } The background for this code is that we had found a duplicate key value in scanIndex so we know that at least one of the record versions contain a duplicate. We search the base record and each prior record to fins any and all possible duplicate records and see if they are visible or not. If they are pending, we should wait for that other transaction to complete. Here, we found a record version that is active but not a duplicate. We must need to note the activeTransaction before looking further. If we later find a duplicate that would be visible if this transaction completed, then we must wait on that active transaction. What happened here is that sometime between the instant that getRelativeState() was called to find that the dup->transaction was still pending and the current instant, the transaction was detached from that recordVersion. The transaction was probably rolled back since that happens a lot quicker than a commit, writeComplete, and scavenge. It looks like this code can just safely keep looking for dups if the transaction is returned null here.
[14 Feb 2009 17:12]
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/commits/66348 3018 Kevin Lewis 2009-02-14 Bug#42828 - The background for this code is that we had found a duplicate key value in scanIndex so we know that at least one of the record versions contain a duplicate. We search the base record and each prior record to find any and all possible duplicate records and see if they are visible or not. If they are pending, we should wait for that other transaction to complete. Here, we found a record version that is active but not a duplicate. We must need to note the activeTransaction before looking further. If we later find a duplicate that would be visible if this transaction completed, then we must wait on that active transaction. What happened here is that sometime between the instant that getRelativeState() was called to find that the dup->transaction was still pending and the current instant, the transaction was detached from that recordVersion. The transaction was probably rolled back since that happens a lot quicker than a commit, writeComplete, and scavenge. This code can just safely keep looking for dups if the transaction is returned null here.
[2 Mar 2009 14:12]
Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090302140208-lfdejjbcyezlhhjt) (version source revid:vvaintroub@mysql.com-20090214213452-djoygjmxbmbgp8hj) (merge vers: 6.0.10-alpha) (pib:6)
[15 May 2009 15:10]
MC Brown
Internal/test fix. No changelog entry required.