Page MenuHomePhabricator

Migrate WikiPage::doEditContent to using startAtomic/endAtomic
Closed, ResolvedPublic

Description

This is the last caller in core that does a direct $dbw->begin()/commit() pair without exception for existing transactions. This should be fixed to avoid breaking existing transactions.

The begin/commit calls could be replaced and the code after them can use onTransactionIdle(). This would mean the post-commit updates would still be post-commit, though for cases were hooks/extensions cause multiple page edits, the ordering will change. It would go from:

BEGIN
main edit updates 1
COMMIT
post-commit updates 1
BEGIN (implicit COMMIT)
main edit updates 2
COMMIT
post-commit updates 2
(COMMIT)

...to something like:

BEGIN
main edit updates 1
main edit updates 2
COMMIT
post-commit updates 1
post-commit updates 2
(COMMIT)

A similar change was done to MovePage.php.

Event Timeline

aaron created this task.Dec 7 2015, 8:53 PM
aaron updated the task description. (Show Details)
aaron raised the priority of this task from to Needs Triage.
aaron added a subscriber: aaron.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 7 2015, 8:53 PM
aaron set Security to None.
aaron claimed this task.

Change 258743 had a related patch set uploaded (by Aaron Schulz):
[WIP] Convert page creation to using startAtomic()/endAtomic()

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

Change 258744 had a related patch set uploaded (by Aaron Schulz):
[WIP] Convert page modification to using startAtomic()/endAtomic()

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

Change 258747 had a related patch set uploaded (by Aaron Schulz):
Move ArticleSaveComplete hook to doCreate()/doModify() methods

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

Change 258747 merged by jenkins-bot:
Move ArticleSaveComplete hook to doCreate()/doModify() methods

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

aaron moved this task from Inbox to Blocked on the Performance-Team board.Dec 21 2015, 7:44 PM
Krinkle triaged this task as High priority.Dec 21 2015, 7:58 PM

Change 258743 merged by jenkins-bot:
Convert page creation to using startAtomic()/endAtomic()

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

Change 258744 merged by jenkins-bot:
Convert page modification to using startAtomic()/endAtomic()

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

aaron closed this task as Resolved.Feb 9 2016, 1:10 AM
Krinkle moved this task from Blocked to Doing on the Performance-Team board.Aug 5 2016, 1:21 AM