Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-804

LP #1258135: pt-deadlock-logger introduces a noise to MySQL

Details

    Description

      **Reported in Launchpad by Roman Vynar last update 10-07-2014 12:12:31

      Hello,

      pt-deadlock-logger introduces a noise to MySQL because it does:
      INSERT IGNORE INTO `percona`.`deadlocks` (`server`,`ts`,`thread`,`txn_id`,`txn_time`,`user`,`hostname`,`ip`,`db`,`tbl`,`idx`,`lock_type`,`lock_mode`,`wait_hold`,`victim`,`query`)
      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist