retry and/or avoid push_notify deadlocks

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
Bugzilla Change Notification System
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production
x86
Mac OS X

Details

Attachments

(1 attachment)

push_notify is a pretty hot table, and triggers deadlocks from time to time:

Deadlock found when trying to get lock; try restarting transaction [for Statement "REPLACE INTO push_notify(bug_id, delta_ts) VALUES(?, ?)"] at ..

we should catch these and automatically retry (with an upper limit on attempts of course).
Duplicate of this bug: 1139909
looking at this it's trickier than i first thought, due to the broad scope of the bug transaction.

i'll probably move the push_notify update so it executes after the bug transaction has been committed, which may make it easier to retry.
Assignee: nobody → glob
Summary: automatically retry push_notify deadlocks → retry and/or avoid push_notify deadlocks
Created attachment 8576036 [details] [diff] [review]
1138767_1.patch

i started looking at adding more hooks akin to bug_after_create, but that quickly got complicated.  instead i've added a hook to the request cleanup method and insert the rows there.
Attachment #8576036 - Flags: review?(dkl)
Comment on attachment 8576036 [details] [diff] [review]
1138767_1.patch

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

r=dkl
Attachment #8576036 - Flags: review?(dkl) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   03a2eac..0f2b779  master -> master
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Duplicate of this bug: 1122594
You need to log in before you can comment on or make changes to this bug.