pt-slave-delay causes errors if slave is stopped with an error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Triaged
|
Undecided
|
Unassigned |
Bug Description
If the slave pt-slave-delay runs on stops with an replication error, for example when a table does not exist, every time pt-slave-delay tries to restart the slave there are errors logged:
Feb 10 21:58:28 rinske mysqld: 120210 21:58:28 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.004782' at position 206803715, relay log '/var/log/
Feb 10 21:58:28 rinske mysqld: 120210 21:58:28 [ERROR] Slave SQL: Error 'Table 'scratch0.
Feb 10 21:58:28 rinske mysqld: 120210 21:58:28 [Warning] Slave: Table 'scratch0.
Feb 10 21:58:28 rinske mysqld: 120210 21:58:28 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.004782' position 206803715
Could pt-slave-delay possibly check Last_Errno from SHOW SLAVE STATUS before restarting the slave thread?
I run pt-slave-delay like this:
pt-slave-delay --delay 60m --interval 5m --defaults-
root@rinske:
pt-slave-delay 2.0.2
mysql> SHOW VARIABLES LIKE "%version%";
+------
| Variable_name | Value |
+------
| innodb_version | 1.0.17-rel13.1 |
| protocol_version | 10 |
| version | 5.1.60-rel13.1-log |
| version_comment | (Percona Server (GPL), 13.1, Revision 413) |
| version_
| version_compile_os | debian-linux-gnu |
+------
6 rows in set (0.00 sec)
tags: | added: pt-slave-delay |
tags: | added: crash |
Changed in percona-toolkit: | |
status: | New → Triaged |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-926