Closed Bug 1138767 Opened 9 years ago Closed 9 years ago

retry and/or avoid push_notify deadlocks

Categories

(bugzilla.mozilla.org Graveyard :: Bugzilla Change Notification System, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(1 file)

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).
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
Attached patch 1138767_1.patchSplinter Review
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
Closed: 9 years ago
Resolution: --- → FIXED
Product: bugzilla.mozilla.org → bugzilla.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: