Make DeferredUpdates able to run DataUpdates
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 28 Aug 2016 16:23:52 +0000 (09:23 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 2 Sep 2016 04:12:50 +0000 (04:12 +0000)
commitdc0cdc8a4dd0265317ce9a93a0579a9f84419c87
tree657df097231113997d33982f5a2d8b526a536a89
parentce504f2d19b7450c75f0a332089a720e2ea402ce
Make DeferredUpdates able to run DataUpdates

* Also make ErrorPageError exceptions display themselves
  in PRESEND mode. Before they were always suppressed.
* Make DataUpdate::runUpdates() simply wrap
  DeferredUpdates::execute().
* Remove unused installDBListener() method, which was
  basically moved to Maintenance.
* Enable DBO_TRX for DeferredUpdates::execute() in CLI mode
* Also perform sub-DeferrableUpdate jobs right after their
  parent for better transaction locality.
* Made rollbackMasterChangesAndLog() clear all master
  transactions/rounds, even if there are no changes yet.
  This keeps the state cleaner for continuing.
* For sanity, avoid calling acquirePageLock() in link updates
  unless the transaction ticket is set. These locks are
  already redundant and weaker in range than the locks the
  Job classes that run them get. This helps guard against
  DBTransactionError.
* Renamed $type to $stage to be more clear about the order.

Change-Id: I1e90b56cc80041d70fb9158ac4f027285ad0f2c9
includes/api/ApiPurge.php
includes/deferred/DataUpdate.php
includes/deferred/DeferredUpdates.php
includes/deferred/LinksDeletionUpdate.php
includes/deferred/LinksUpdate.php
includes/exception/MWExceptionHandler.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/deferred/DeferredUpdatesTest.php