Move category membership RC updates to CategoryMembershipChangeJob
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 15 Nov 2015 02:29:37 +0000 (18:29 -0800)
committerAddshore <addshorewiki@gmail.com>
Thu, 3 Dec 2015 11:28:05 +0000 (11:28 +0000)
commit6dedffc2d7f8a43f563d85db4110984818be7444
tree26939431fbc5db9fbed1b96c63745dd51b469104
parentf678f20451b433a6587574faf52d6a5a862eee42
Move category membership RC updates to CategoryMembershipChangeJob

* Recursive link updates no longer mention an category changes.
  It's hard to avoid either duplicate mentioning of changes or
  confusing explicit and automatic category changes.
* LinksUpdate no longer handles this logic, but rather WikiPage
  decides to spawn this update when needed in doEditUpdates().
* Fix race conditions with calculating category deltas. Do not
  rely on the link tables for the read used to determine these
  writes, as they may be out-of-date due to slave lag. Using the
  master would still not be good enough since that would assume
  FIFO and serialized job execution, which is not garaunteed.
  Use the parser output of the relevant revisions to determine
  the RC rows. If 3 users quickly edit a page's categories, the
  old way could misattribute who actually changed what.
* Make sure RC rows are inserted in an order that matches that
  of the corresponding revisions.
* Better avoid mentioning time-based (parser functions) category
  changes so they don't get attributed to the next editor.
* Also wait for slaves between RC row insertions if there where
  many category changes (it theory it could well over 10K rows).
* Using a separate job better separates concerns as LinksUpdate
  should not have to care about recent changes updates.
* Added more docs to $wgRCWatchCategoryMembership.

Bug: T95501
Change-Id: I5863e7d7483a4fd1fa633597af66a0088ace4c68
autoload.php
includes/DefaultSettings.php
includes/changes/CategoryMembershipChange.php
includes/deferred/LinksUpdate.php
includes/jobqueue/jobs/CategoryMembershipChangeJob.php [new file with mode: 0644]
includes/page/WikiPage.php
includes/specials/SpecialUndelete.php
tests/phpunit/includes/deferred/LinksUpdateTest.php