pt-query-digest --processlist reports duplicate queries for replication thread

Bug #1156901 reported by Nickolay Ihalainen
8
This bug affects 1 person
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/sbin/pt-query-digest --interval 0.2 --filter '$event->{Query_time} > 1' --processlist h=SERVER,u=USER -p PASSWORD --print --no-report --run-time 3600 > logs/SERVER-`date +%Y%m%d-%H`

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.000298976898193359 seconds
# Processlist:2488 25797 New cxn 166
# Processlist:2442 25797 Checking existing cxn 167
# Processlist:2458 25797 Query restarted; new query 1363226464.1831 0.000298976898193359 1363226463 1
# 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-14T02:01:24',
# user => 'system user'
# };

# Processlist:2417 25797 Polling PROCESSLIST
# Processlist:2428 25797 Rows: 3 in 0.000288009643554688 seconds
# 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-14T02:01:25',
# user => 'system user'
# };

Related branches

description: updated
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

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.

Changed in percona-toolkit:
status: New → Confirmed
milestone: none → 2.2.2
tags: added: percona-29132
removed: i29132
Changed in percona-toolkit:
importance: Undecided → Medium
assignee: nobody → Brian Fraser (fraserbn)
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
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-605

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.