pt-query-digest --processlist reports duplicate queries for replication thread
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Brian Fraser |
Bug Description
pt-query-digest --processlist can't merge correctly show full processlist outputs for slave thread. As a result wrong queries could be listed in a report.
percona toolkit 2.1.8 and 2.1.5 versions are affected.
/usr/local/
Replication thread can't execute two queries in parallel at the same time:
Processlist:2417 25797 Polling PROCESSLIST
# Processlist:2428 25797 Rows: 3 in 0.0002989768981
# Processlist:2488 25797 New cxn 166
# Processlist:2442 25797 Checking existing cxn 167
# Processlist:2458 25797 Query restarted; new query 1363226464.1831 0.0002989768981
# Processlist:2565 25797 Query is still in Repair by sorting state
# Processlist:2547 25797 Properties of event: $VAR1 = {
# Lock_time => 0,
# Query_time => 21,
# arg => 'OPTIMIZE TABLE t',
# bytes => 46,
# db => 't',
# host => '',
# id => 167,
# ts => '2013-03-
# user => 'system user'
# };
# Processlist:2417 25797 Polling PROCESSLIST
# Processlist:2428 25797 Rows: 3 in 0.0002880096435
# Processlist:2488 25797 New cxn 166
# Processlist:2442 25797 Checking existing cxn 167
# Processlist:2449 25797 Info is different; new query
# Processlist:2569 25797 Query changed from state Sorting index to undef
# Processlist:2547 25797 Properties of event: $VAR1 = {
# Lock_time => 0,
# Query_time => 21,
# arg => 'OPTIMIZE TABLE t',
# bytes => 46,
# db => 't',
# host => '',
# id => 167,
# ts => '2013-03-
# user => 'system user'
# };
Related branches
- Daniel Nichter: Approve
-
Diff: 372 lines (+186/-24)4 files modifiedbin/pt-kill (+27/-6)
bin/pt-query-digest (+34/-14)
lib/Processlist.pm (+18/-4)
t/lib/Processlist.t (+107/-0)
description: | updated |
Changed in percona-toolkit: | |
importance: | Undecided → Medium |
assignee: | nobody → Brian Fraser (fraserbn) |
Changed in percona-toolkit: | |
status: | Confirmed → Fix Committed |
summary: |
- pt-query-digest --processlist: Duplicate entries for replication thread + pt-query-digest --processlist reports duplicate queries for replication + thread |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
I think there's another bug about this, basically that pt-query-digest --processlist thinks a new event has happened when the same process's state has changed, so really it's the same event.