Bug #48124 | Allow InnoDB to return the master coordinates when a transaction is started | ||
---|---|---|---|
Submitted: | 16 Oct 2009 21:04 | ||
Reporter: | Harrison Fisk | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S4 (Feature request) |
Version: | 5.0,5.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Backup, Contribution, flush, hot, innodb, read lock |
[16 Oct 2009 21:04]
Harrison Fisk
[17 Oct 2009 0:10]
Mark Callaghan
First sign that it might work: start transaction with consistent innodb snapshot; File Position master-bin.000001 153779
[20 Oct 2009 18:31]
Mark Callaghan
previous patch file was corrupt
Attachment: 0001-Provide-fast-and-non-blocking-alternative-to-FLUSH-T.patch (application/octet-stream, text), 21.47 KiB.
[21 Oct 2009 1:37]
Harrison Fisk
The patch won't compile with embedded enabled. show_master_offset is used in begin_trans, however if HAVE_REPLICATION isn't defined (such as for embedded), then show_master_offset isn't defined and hence causes an error in compiling. If you add an #ifdef HAVE_REPLICATION around the usage of show_master_offset, then it will compile fine.
[17 Nov 2009 1:33]
Mark Callaghan
updated patch
Attachment: ip (application/octet-stream, text), 20.68 KiB.
[17 Nov 2009 16:01]
Heikki Tuuri
The main reason for using FLUSH TABLES WITH READ LOCK in innobackup is to stop DDL operations so that we can copy all the .frm files.
[17 Nov 2009 16:06]
Harrison Fisk
Hi Heikki! The usage for this is for mysqldump primarily. innodb hot backup can already get the binary logs from the crash recovery output, so it wouldn't get any advantage from this change. mysqldump --master-data --single-transaction already has issues if there are DDL statements while it is running, so this wouldn't make it any worse.
[17 Nov 2009 16:08]
Heikki Tuuri
I see, in this case the backup would only contain dumps of certain tables, as well as the master binlog position which corresponds to the consistent snapshot of the tables.
[17 Nov 2009 17:06]
Mark Callaghan
Maybe this implementation doesn't help InnoDB hot backup, but InnoDB hot backup has the same problem with FLUSH TABLES WITH READ LOCK. Nobody likes to run FTWRL on a busy master. So providing an alternative to FTWRL that doesn't have the potential to lock up a server might make ibbackup customers happy.
[17 Nov 2009 19:24]
Konstantin Osipov
With the fix for Bug#989 DDL shouldn't cause any problems to a running transaction.
[25 Apr 2010 15:31]
Mark Callaghan
Patch for this is in http://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1/revision/3415