pt-stalk truncates InnoDB status if there are too many transactions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Daniel Nichter |
Bug Description
If there is a very high number of open transactions, the output from SHOW ENGINE INNODB STATUS will be truncated.
I think pt-stalk could create the innodb_monitor table in addition to running the SHOW ENGINE command, so that if the output is truncated, the full content will be sent to the error log.
Since the error log is already saved, I believe this can be achieved by simply adding the following lines to the start and end of a capture:
$CMD_MYSQL $EXT_ARGV mysql -e 'CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB'
$CMD_MYSQL $EXT_ARGV mysql -e 'DROP TABLE innodb_monitor'
Feel free to change this into a feature request. In my personal experience I prefer to consider it a bug as we're missing a very important part of the picture while trying to diagnose an intermittent db outage.
Related branches
- Daniel Nichter: Approve
-
Diff: 127 lines (+54/-14)2 files modifiedbin/pt-stalk (+27/-7)
lib/bash/collect.sh (+27/-7)
tags: | added: pt-stalk |
Changed in percona-toolkit: | |
status: | New → Triaged |
Changed in percona-toolkit: | |
milestone: | none → 2.2.1 |
importance: | Undecided → Medium |
Changed in percona-toolkit: | |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
summary: |
- pt-stalk does not get the full innodb output if there are too many - transactions + pt-stalk truncates InnoDB status if there are too many transactions |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Fernando, can you clarify how/why this works? So you're saying that if SHOW ENGINE INNODB STATUS is truncated due to too many open transactions, that creating a table--any table--will fail and that failure will be logged along with the entire output of SHOW ENGINE INNODB STATUS?