pt-deadlock-logger introduces a noise to MySQL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Frank Cizmich |
Bug Description
Hello,
pt-deadlock-logger introduces a noise to MySQL because it does:
INSERT IGNORE INTO `percona`
VALUES ...
every minute on every deadlock that appears under SHOW ENGINE INNODB STATUS.
For example, say a deadlock happened 1 year ago, and MySQL keeps it in the memory and pt-deadlock-logger will INSERT it into percona.deadlocks table every minute all the time until restart. This introduces a noise.
If we expect to see no writes on the master, pt-deadlock-logger should not be a problem and should not introduce those unnecessary writes.
The suggestion is to do SELECT to check whether a row exists in percona.deadlocks table and only do INSERT otherwise.
Thanks.
Related branches
- Percona Toolkit developers: Pending requested
-
Diff: 83 lines (+36/-35)1 file modifiedbin/pt-deadlock-logger (+36/-35)
- Percona Toolkit developers: Pending requested
-
Diff: 83 lines (+36/-35)1 file modifiedbin/pt-deadlock-logger (+36/-35)
Changed in percona-toolkit: | |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
Changed in percona-toolkit: | |
milestone: | none → 2.2.9 |
status: | New → Fix Committed |
importance: | Undecided → Low |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Fixed by comparing with the last deadlock fingerprint before issuing insert query.