Page MenuHomePhabricator

D3. EnsureFlowRevision() is called when viewing an unconverted page in an occupied namespace
Closed, ResolvedPublic

Description

Related to T101881: Unknown topic error when viewing unconverted page in occupied namespace, if you create a wikitext page in a namespace and then have Flow occupy that namespace, viewing that page (a GET request) will cause ensureFlowRevision() to be called, which will edit the page (which obviously causes database writes) and also call getTalkPageManager() which can cause additional writes due to T101888: TalkPageManager::getTalkPageManager unconditionally adds flow-bot group and T101889: TalkPageManager::getTalkpageManager can create user

Event Timeline

Catrope created this task.Jun 9 2015, 8:29 PM
Catrope raised the priority of this task from to High.
Catrope updated the task description. (Show Details)
Catrope added subscribers: Aklapper, Legoktm, Catrope.
matthiasmullie set Security to None.

Change 218689 had a related patch set uploaded (by Matthias Mullie):
Don't write when we're reading data

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

DannyH renamed this task from ensureFlowRevision() is called when viewing an unconverted page in an occupied namespace to D3. EnsureFlowRevision() is called when viewing an unconverted page in an occupied namespace.Jun 16 2015, 7:20 PM

I can't confirm the bug report (it doesn't attempt to convert it on read), but I think https://gerrit.wikimedia.org/r/#/c/218689/ should fix this.
The only other places ensureFlowRevision() is still present are:

  • SubmissionHandler::commit: guaranteed to only be run on POST
  • OccupationListener::onAfterInsert: only runs after executing actions that can only be performed on POST
  • TalkpageImportOperation::import: manually triggered
  • WorkflowPageIdUpdateGenerator::update (maintenance script FlowUpdateWorkflowPageId.php): manually triggered
  • tests

Change 218689 merged by jenkins-bot:
Don't write when we're reading data

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

Etonkovidova added a subscriber: Etonkovidova.EditedJun 19 2015, 4:18 PM

Checked while checking https://phabricator.wikimedia.org/T102261 with

/extensions/Flow/maintenance/convertNamespaceFromWikitext.php

Also, seems that https://phabricator.wikimedia.org/T101890 is fixed?

DannyH closed this task as Resolved.Jun 19 2015, 5:37 PM
DannyH added a subscriber: DannyH.