Percona Toolkit - pt-deadlock - Lock Type Documentation

Bug #1243731 reported by Vinoth Kanna RS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

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

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

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?

tags: added: docs
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

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.

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1164

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.