Make RefreshLinksJob de-duplication more robust
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 1 Dec 2015 23:40:46 +0000 (15:40 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 4 Dec 2015 20:40:10 +0000 (12:40 -0800)
commit25a39d255c444aa242f38650f7a130e81a82061f
tree0b79ac5ec6b9521aefc2e507df09258005b2e3c1
parent7ef3723818423c0144e3959d7f9bc600085a4cd8
Make RefreshLinksJob de-duplication more robust

* Do not de-duplicate jobs with "masterPos". It either does not
  catch anything or is not correct. Previously, it was the later,
  by making getDuplicationInfo() ignore the position. That made the
  oldest DB position win among "duplicate" jobs, which is unsafe.
* From graphite, deduplication only applies .5-2% of the time for
  "refreshLinks", so there should not be much more duplicated
  effort. Dynamic and Prioritized refreshLinks jobs remain
  de-duplicated on push() and root job de-duplication still applies
  as it did before. Also, getLinksTimestamp() is still checked to
  avoid excess work.
* Document the class constants.

Change-Id: Ie9a10aa58f14fa76917501065dfe65083afb985c
includes/jobqueue/jobs/RefreshLinksJob.php