If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

deadlocks setting last_activity_ts (Deadlock found when trying to get lock; try restarting transaction [for Statement "UPDATE profiles SET last_activity_ts = ? WHERE userid = ?"])

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
Extensions: UserProfile
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production
x86
Mac OS X

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
part of the userprofile extension involves touching last_activity_ts when a user touches a bug.

i've noticed a few deadlocks as a result of this:

DBD::mysql::db do failed: Deadlock found when trying to get lock; try restarting transaction [for Statement "UPDATE profiles SET last_activity_ts = ? WHERE userid = ?"] (Bugzilla/Object.pm:442)

one way of fixing this may be to commit the changes to the profile outside of the main transaction block, as small transactions are less prone to collision.
(Assignee)

Comment 1

4 years ago
Created attachment 795388 [details] [diff] [review]
909278_1.patch
Attachment #795388 - Flags: review?(dkl)
Comment on attachment 795388 [details] [diff] [review]
909278_1.patch

Review of attachment 795388 [details] [diff] [review]:
-----------------------------------------------------------------

Works good. r=dkl
Attachment #795388 - Flags: review?(dkl) → review+
(Assignee)

Comment 3

4 years ago
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified Bugzilla/Bug.pm
modified extensions/UserProfile/Extension.pm
Committed revision 8971.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 4

4 years ago
Thank you; I'd seen the odd deadlock when using TBPL (tbplbot etc). Will keep an eye out for any more, and if needed I guess we can always exempt tbplbot like we do for the first patch extension.
tbplbot is still colliding, quite frequently.

Comment 6

4 years ago
Spoken to glob about this on IRC - we need timestamps, a copy of the error shown in TBPL (ie what BzAPI returns) and also whether the comment actually ended up in the bug. When we have that please file as a new bug marked blocking this one - cheers! :-)
Blocks: 912564
You need to log in before you can comment on or make changes to this bug.