Various fixes and simplifications to RefreshLinksJob::runTitle()
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 2 Apr 2019 08:25:48 +0000 (01:25 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 11 Jul 2019 06:06:02 +0000 (06:06 +0000)
commitf588586e16c9c8043d6db1a262a00db4c12dc9a1
tree3e980a4626364368e20308d01555f2ab85bf88e3
parent897e86ce9619d57924b506443cc1e32b46d1a394
Various fixes and simplifications to RefreshLinksJob::runTitle()

* Remove logic for saving slow-to-render parser output. This has
  not worked ever since DerivedPageDataUpdater was introduced.
* Make the logic to use cached output actually work. This was
  also broken since DerivedPageDataUpdater was added. In order
  to pass the output, add a known-revision-output parameter
  to both WikiPage::doSecondaryUpdates() and
  DerivedPageDataUpdater::prepareUpdate().
* Also factored out some helper methods from runForTitle() in
  RefreshLinksJob to make it more readable and avoid the need
  for multiple transaction round commit calls. This makes the
  case of multiple-title jobs less likely to break again.
* Make use of RefreshLinksJob::runForTitle() return value.
* Add unit tests for multiple-title job case.

Change-Id: I0cd13c424a87653b5a7253c42cd48fe43befd692
includes/Storage/DerivedPageDataUpdater.php
includes/deferred/LinksUpdate.php
includes/jobqueue/jobs/RefreshLinksJob.php
includes/page/WikiPage.php
tests/phpunit/includes/jobqueue/jobs/RefreshLinksJobTest.php