Provide alternative to --no-lock that stops slave but does not lock tables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Medium
|
Rodrigo Gadea |
Bug Description
Hi
I've seen some backups spuriously fail with an error message:
innobackupex: Error: Connection to mysql child process (pid=15332) timedout. (Time limit of 900 seconds exceeded. You may adjust time limit by editing the value of parameter "$mysql_
This is in the last phase where xtrabackup has copied all InnoDB table spaces, and is suspended so that innobackupex should lock all tables and backup MyISAM tables and other non-InnoDB tables, .frm files and such. It seems taking a global lock fails simply because there are updates and inserts happening during this time.
There's the --no-lock option that would allow innobackupex to proceed without trying to lock. This is safe if you are not writing to any MyISAM (or other) tables, and not doing any DDL (.frm files). These assumptions hold for us and indeed, taking a lock on all tables is a bit hard handed, when 99% of the backup is already done in online fashion by xtrabackup.
However, the problem is that we use replication, so the replication state will be inconsistent. In fact, with --no-lock the slave_info and binlog_info files are not written out at all (those are done inside mysql_lockall().
It would be useful for us to have a new option (like --no-lock-
Relevant code in innobackupex are lines 370-... and 1180-1210.
Would this work and be safe?
Changed in percona-xtrabackup: | |
status: | Triaged → In Progress |
Changed in percona-xtrabackup: | |
status: | In Progress → Fix Committed |
Alternatively, the current --no-lock could be changed to behave as I suggest. I don't know if there are people that need to keep the slave applying.