Bug #32301 | Falcon storage engine does not support consistent read via handler methods | ||
---|---|---|---|
Submitted: | 13 Nov 2007 0:57 | Modified: | 3 Dec 2007 14:26 |
Reporter: | Chuck Bell | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S3 (Non-critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Kevin Lewis | CPU Architecture: | Any |
[13 Nov 2007 0:57]
Chuck Bell
[13 Nov 2007 1:14]
Chuck Bell
I have compiled Kevin's code in mysql-6.0-falcon-team after pulling from mysql-6.0-backup and applying the patch for BUG#31383. The code compiles well on Windows (great job, Falcon team!) and online backup correctly identifies the falcon table as supporting consistent read. However, when the consistent snapshot test was run, the backup image included rows inserted during the period when the consistent read should have been activated. I have included a modified version of the backup_snapshot test that can be used to test whether the falcon storage engine is correctly engaging the consistent read. Please see WL#4120 for details on how the test was constructed and how to set breakpoints in the backup code to ensure deterministic results. NOTICE: This bug report, once solved, will require BUG#31383 and the code from mysql-6.0-backup (if BUG#31383 has not been included already).
[13 Nov 2007 1:15]
Chuck Bell
Modified consistent snapshot test (includes falcon tables).
Attachment: backup_snapshot.test (application/octet-stream, text), 5.35 KiB.
[14 Nov 2007 6:41]
Kevin Lewis
In ha_falcon.cpp, StorageInterface::start_consistent_snapshot(), I used the wrong transaction isolation level; int ret = storageHandler->startTransaction(thd, TRANSACTION_READ_COMMITTED); It should be int ret = storageHandler->startTransaction(thd, TRANSACTION_CONSISTENT_READ); I debugged it with Chuck Bell's merged tree and test case, and it does start the transaction OK. I pushed this into the mysql-6.0-falcon-team tree.
[16 Nov 2007 7:03]
Kevin Lewis
Checked in another change which allowed the test case to work. Forwarded a patch to Chuck for verification.
[16 Nov 2007 16:26]
Chuck Bell
I can confirm that the changes descibed above fix the problem. In addition, I think it best to add falcon to the existing backup_snapshot test. I have attached a patch to do this. A corresponding result file can be generated. Note: The new test should be pushed only after the mysql-6.0-backup tree is merged with the mysql-6.0-falcon-team tree (via the normal process). This is because the corrected test requires the latest patches from mysql-6.0-backup and mysql-6.0-falcon-team. Specifically, the patch for BUG#31383 (which was pushed on 15 Nov) and the falcon code updates.
[16 Nov 2007 16:26]
Chuck Bell
Diffs to add falcon table to backup_snapshot.test.
Attachment: falcon_snapshot.diffs (application/octet-stream, text), 6.24 KiB.
[16 Nov 2007 16:27]
Chuck Bell
Sample result file for updated backup_snapshot test.
Attachment: backup_snapshot.result (application/octet-stream, text), 5.69 KiB.
[20 Nov 2007 20:27]
Jeffrey Pugh
Upgraded because of need to provide support for Online Backup Consistent Snapshot backup in Falcon in 6.0.4
[26 Nov 2007 19:23]
Kevin Lewis
Chuck, Is there a testcase or test sequence that shows what is still wrong with this consistent snapshot code?
[29 Nov 2007 15:07]
Kevin Lewis
> From: Kevin Lewis [mailto:klewis@mysql.com] > Sent: Thursday, November 29, 2007 6:17 AM > I do not see any problems with Falcon consistent snapshot. I > ran Chuck's latest testcase and code with a break on the > backup wait, and was sure that during the backup, another > client inserted and updated the table. After the restore, > the new records were not visible. -----Original Message----- From: Chuck Bell [mailto:cbell@mysql.com] Sent: Thursday, November 29, 2007 8:57 AM I concur. The falcon code works. I did a rebuild and the issue I was seeing went away. Operator error let's call it. ;)
[30 Nov 2007 20:43]
Bugs System
Pushed into 6.0.4-alpha
[3 Dec 2007 14:26]
MC Brown
A note has been added to the 6.0.4 changelog: Falcon would incorrectly return the supported repeatable-read level when queried by the Online Backup system, preventing the ability to create a consistent snapshot backup.