LP #1243731: Percona Toolkit - pt-deadlock - Lock Type Documentation

Description

**Reported in Launchpad by Vinoth Kanna RS last update 28-08-2014 08:43:42

Recently We have queried by the customer regarding the lock mode 'A' in percona.deadlocks tables, While investigating there was no info regarding this lock mode, Only X , S , IX , IS were documented in the lock modes, Investigating further, We found the below details.

lock_mode | char(1) | NO | | NULL

MySQL thread id 121, query id 28932947 localhost 127.0.0.1 bt update
INSERT INTO wager (amount_won, confirmation, created_by_partner, creation_date, description, fantasy_league,
first_game_start, image_thumb, image_wide, kind, last_game_start, last_update_version, locked, name,
num_future, num_past, num_present, partner, partner_wager_id, percent, progressive_num, result, status,
sub_kind, teaser_type, user_account, wager_amount, win_amount)
VALUES (null, 2, 1, '2011-10-31 17:39:26', 'Straight Bet', null, null, 'http://iphonebet_s.png',
'http://iphonebet_l.png', 9, null, 0, 1, 'NFL: SD/KC o +7.5', 0, 0, 0, 26, '39812916-1',
null, null, 1, 1, null, null, 2045, '260', '200')

  •  

    •  

      • (2) HOLDS THE LOCK(S):
        RECORD LOCKS space id 0 page no 2712 n bits 264 index `PRIMARY` of table `bt/user_account` trx id 0 984900638 lock_mode X locks rec but not gap
        Record lock, heap no 72
        Record lock, heap no 107
        Record lock, heap no 126

      • (2) WAITING FOR THIS LOCK TO BE GRANTED:
        TABLE LOCK table `bt/wager` trx id 0 984900638 lock mode AUTO-INC waiting

In the example like above, it would have logged A

So I ' m requesting to document Lock mode A as Auto-Inc Lock Waiting

Thanks and Regards,
Vinoth Kanna RS
Remote DBA, Percona

Environment

None

Smart Checklist

Activity

lpjirasync January 24, 2018 at 7:51 PM

**Comment from Launchpad by: Valerii Kravchuk on: 28-08-2014 08:43:32

I can just confirm that lock_mode and lock_type are NOT documented/explained at all in current documentation (http://www.percona.com/doc/percona-toolkit/2.2/pt-deadlock-logger.html). We should document possible values and/or provide links to other sources explaining them.

lpjirasync January 24, 2018 at 7:51 PM

**Comment from Launchpad by: Daniel Nichter on: 30-10-2013 19:48:03

Vinoth,

pt-dead-lock-logger doesn't document any lock types or modes:

"""
=item lock_type

The lock type the transaction held on the lock that caused the deadlock.

=item lock_mode

The lock mode of the lock that caused the deadlock.
"""

You said, "Only X , S , IX , IS were documented in the lock modes"--where is this documented?

Details

Assignee

Reporter

Priority

Components

Fix versions

Smart Checklist

Created January 24, 2018 at 7:51 PM
Updated January 15, 2024 at 11:40 AM

Flag notifications