Bug #47519 | Falcon; Assert in StorageTable::updateRow | ||
---|---|---|---|
Submitted: | 22 Sep 2009 13:01 | Modified: | 26 May 2010 17:48 |
Reporter: | Kevin Lewis | Email Updates: | |
Status: | Unsupported | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | Kevin Lewis | CPU Architecture: | Any |
Tags: | F_RECORD TREE |
[22 Sep 2009 13:01]
Kevin Lewis
[22 Sep 2009 13:02]
Kevin Lewis
Verified by developer.
[22 Sep 2009 13:21]
Kevin Lewis
The algorithm for choosing a record to snip is wrong because it uses the transaction ID to determine if an old record is visible to an active transaction. It aught to use the commit ID of the old record. Example Record chain: (transaction ID - commit ID) (5-9)<-(20-25)<-(30-45)<-(50-55) Active Transactions = 10, 40 & 60 In this example, transaction 10 sees the record for transaction 5 since it committed before 10 started. But transaction 40 does not see the record for transaction 30 since it was not committed when 40 started. Instead, it sees the record for transaction 20. The current algorithm only looks at the transaction ID and so chooses (20-25) to snip. Instead, it should snip (30-45) since that record is actually the only one invisible to any active transaction. There is a function is Falcon called Transaction::visible() which does this correctly, but it was not used in RecordScavenge::canBeSnipped() because the pointer to the active transaction is not readily available. It uses a bitmap of active transaction IDs. The the rules implemented correctly in Transaction::visible() should be done again in RecordScavenge::canBeSnipped().
[28 Sep 2009 16:58]
Kevin Lewis
Fixed with the following patch; ------------------------------------------------------------ revno: 2792 revision-id: kevin.lewis@sun.com-20090922145242-iqzj5jgj2fje7zzw parent: kevin.lewis@sun.com-20090922134839-qfh7660uls7l982j committer: Kevin Lewis <kevin.lewis@sun.com> branch nick: mysql-6.0-falcon-team timestamp: Tue 2009-09-22 09:52:42 -0500 message: Bug#47519 - Implemented an improved version of RecordScavenge::canBeSnipped() which uses the commitId to test visibility instead of the transactionId. This makes it more like Transaction::visible. ------------------------------------------------------------