Merge lp:~percona-toolkit-dev/percona-toolkit/pt-deadlock-logger-introduces-a-noise-to-mysql-1258135 into lp:percona-toolkit/2.2
Proposed by
Frank Cizmich
Status: | Merged |
---|---|
Merged at revision: | 607 |
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/pt-deadlock-logger-introduces-a-noise-to-mysql-1258135 |
Merge into: | lp:percona-toolkit/2.2 |
Diff against target: |
83 lines (+36/-35) 1 file modified
bin/pt-deadlock-logger (+36/-35) |
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-deadlock-logger-introduces-a-noise-to-mysql-1258135 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Percona Toolkit developers | Pending | ||
Review via email: mp+220719@code.launchpad.net |
Description of the change
Background:
By default the tool prints deadlocks to stdout and, if the --dest option is provided, also inserts a log of the deadlock into a table.
To avoid duplicates in the stdout output the tool compares the last deadlocks fingerprint to the current one, discarding if they matched. (the timestamp of the deadlock is mixed in the fingerprint to avoid false negatives)
It did no such check for the output directed to the table, simply relying on the "insert ignore" directive to avoid duplicate key errors.
Fix:
Extended the fingerprint check to the table mode of logging.
Manually verified correct operation by generating deadlocks and checking binlogs.
To post a comment you must log in.