I’m not getting pt-kill to work as expected using match-info to select a specific problematic query (probably because of bug in MySQL, but that’s another question).
When combining the two it sometimes kills queries ignoring the execution time of the executed query. Below is output of a command that is not working as expected:
$ pt-kill --verbose --busy-time=5s --user=root --victims=all --interval=5 --run-time=1s --match-info "MAX_EXECUTION_TIME.5000." --print --nostrip-comments
# 2019-01-16T11:39:31 /usr/bin/pt-kill starting
# 2019-01-16T11:39:31 Connected to host jed
# 2019-01-16T11:39:31 Find spec: $VAR1 = {
all => undef,
busy_time => '5',
idle_time => undef,
ignore => {
Command => undef,
Host => undef,
Id => 360385160,
Info => undef,
State => 'Locked',
User => undef,
db => undef
},
match => {
Command => undef,
Host => undef,
Info => 'MAX_EXECUTION_TIME.5000.',
State => undef,
User => undef,
db => undef
},
replication_threads => undef
};
# 2019-01-16T11:39:31 Run-time: 1 seconds at 5 second intervals
# 2019-01-16T11:39:31 Checking processlist
# 2019-01-16T11:39:31 Matched 1 queries
# 2019-01-16T11:39:31 KILL 360385156 (Execute 0 sec) SELECT
/*+ MAX_EXECUTION_TIME(5000) */
*
FROM
SomeTable
WHERE
MATCH (body) AGAINST ('+abc*' IN BOOLEAN MODE)
ORDER BY quality DESC
LIMIT 1000
# 2019-01-16T11:39:31 Sleeping 5 seconds after normal interval
# 2019-01-16T11:39:36 /usr/bin/pt-kill ending
(the MAX_EXECUTION_TIME not working is the likely bug)
However when I try to replicate the problem using a synthetic query it works as expected.
I have found the following bugs that are probably relevant:
https://jira.percona.com/browse/PT-1492
https://jira.percona.com/browse/PT-548
But cannot find a workaround that works. Does anyone know how I can get pt-kill to work for this allication?
Regards,
Patrik