mydumper --kill-long-queries kills slave thread

Bug #1713201 reported by Karthik Appigatla
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL Data Dumper
New
Undecided
Unassigned

Bug Description

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)

Revision history for this message
Victor Machuca (vmachuca) wrote :

Is there any fix for this?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.