Page MenuHomePhabricator

Reduce locking contention on deletion of pages
Closed, ResolvedPublic

Description

When deleting, SELECT ... FOR UPDATE is run not only over page/revision, but also over comment. This is likely to cause more contention, as the same comment would be used for other pages/deletions/etc. We should assume comments are unmutable, and avoid locking them.

More context at T191875#4119830

Event Timeline

jcrespo triaged this task as Normal priority.Apr 10 2018, 1:26 PM
jcrespo created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 10 2018, 1:26 PM

I believe this have been happening for some time now, but this incident only made it more real (happening not only for large deletes, but for small ones, too): https://logstash.wikimedia.org/goto/9facbbd99d63704f215285470b16d6f5

Change 425283 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] WikiPage: Avoid locking comment and actor tables in doDeleteArticleReal

https://gerrit.wikimedia.org/r/425283

Change 425283 merged by jenkins-bot:
[mediawiki/core@master] WikiPage: Avoid locking comment and actor tables in doDeleteArticleReal

https://gerrit.wikimedia.org/r/425283

Anomie closed this task as Resolved.Apr 12 2018, 3:35 AM
Anomie claimed this task.

This should be resolved now, for deployment next week. If you'd like it backported let me know.

@Anomie, you are the best!