Make WANObjectCache sets account for slave lag
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 1 Oct 2015 02:40:09 +0000 (19:40 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 5 Oct 2015 23:45:13 +0000 (16:45 -0700)
commitdb0b9ef2649c4b62a65205ac9c5959986cd1e2bd
tree6eb64122efcdbf817c55331a925314fce94e4b00
parent93ced1b3507ea3bbadf02c4ab1c84fbd29682bac
Make WANObjectCache sets account for slave lag

* This gets lag information that is useful when
  the calling code is about to run queries that
  will have their results cached.
* This is now used in place of trxTimestamp() for
  WANObjectCache set() and getWithSetCallback().
* The WAN cache will use a low TTL if the lag is
  too high to avoid caching stale data for weeks.
* Bumped MAX_COMMIT_DELAY as nothing enforces it.

Bug: T113204
Change-Id: I2a95b4088cff42d6e980351555f81a4b13519e24
12 files changed:
includes/User.php
includes/actions/InfoAction.php
includes/changetags/ChangeTags.php
includes/db/DBConnRef.php
includes/db/Database.php
includes/db/DatabaseMysqlBase.php
includes/db/IDatabase.php
includes/filerepo/LocalRepo.php
includes/filerepo/file/LocalFile.php
includes/interwiki/Interwiki.php
includes/libs/objectcache/WANObjectCache.php
tests/phpunit/includes/utils/BatchRowUpdateTest.php