← Back to team overview

enterprise-support team mailing list archive

[Bug 1713201] [NEW] mydumper --kill-long-queries kills slave thread

 

Public bug reported:

mydumper is failing with error when there are long running queries (expected)
but it is taking slave sql thread also into consideration (not expected)

mysql> show processlist;
+-----+-------------+----------------------+-----------+-------------+-------+---------------------------------------------------------------+------------------+
| Id  | User        | Host                 | db        | Command     | Time  | State                                                         | Info             |
+-----+-------------+----------------------+-----------+-------------+-------+---------------------------------------------------------------+------------------+
| 167 | repl        | 35.186.158.188:42914 | NULL      | Binlog Dump | 64965 | Master has sent all binlog to slave; waiting for more updates | NULL             |
| 389 | system user |                      | NULL      | Connect     |   303 | Waiting for master to send event                              | NULL             |
| 390 | system user |                      | NULL      | Query       |   303 | Slave has read all relay log; waiting for more updates        | NULL             |
| 396 | root        | localhost            | employees | Query       |     0 | starting                                                      | show processlist |
+-----+-------------+----------------------+-----------+-------------+-------+---------------------------------------------------------------+------------------+
4 rows in set (0.00 sec)

ERROR
** (mydumper:18778): CRITICAL **: There are queries in PROCESSLIST running longer than 60s, aborting dump,
	use --long-query-guard to change the guard value, kill queries (--kill-long-queries) or use 
	different server for dump

to avoid that if we pass --kill-long-queries

root@ubuntu:/home/appigatla# mydumper -u backup_user --password=<pass>
--use-savepoints  --trx-consistency-only --kill-long-queries --outputdir
/backups

** (mydumper:18915): WARNING **: Using trx_consistency_only, binlog
coordinates will not be accurate if you are writing to non transactional
tables.

** (mydumper:18915): WARNING **: Killed a query that was running for
368s

It is killing the slave SQL thread
mysql> show processlist;
+-----+-------------+----------------------+-----------+-------------+-------+---------------------------------------------------------------+------------------+
| Id  | User        | Host                 | db        | Command     | Time  | State                                                         | Info             |
+-----+-------------+----------------------+-----------+-------------+-------+---------------------------------------------------------------+------------------+
| 167 | repl        | 35.186.158.188:42914 | NULL      | Binlog Dump | 65082 | Master has sent all binlog to slave; waiting for more updates | NULL             |
| 389 | system user |                      | NULL      | Connect     |   420 | Waiting for master to send event                              | NULL             |
| 402 | root        | localhost            | employees | Query       |     0 | starting                                                      | show processlist |
+-----+-------------+----------------------+-----------+-------------+-------+---------------------------------------------------------------+------------------+
3 rows in set (0.00 sec)

mysql> pager grep Seconds_Behind_Master
PAGER set to 'grep Seconds_Behind_Master'
mysql> show slave status\G
        Seconds_Behind_Master: NULL
1 row in set (0.00 sec)

Server version: 8.0.1-dmr-log MySQL Community Server (GPL)

** Affects: mydumper
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1713201

Title:
  mydumper --kill-long-queries kills slave thread

To manage notifications about this bug go to:
https://bugs.launchpad.net/mydumper/+bug/1713201/+subscriptions