MessageCache invalidation improvements
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 29 Nov 2016 03:38:57 +0000 (03:38 +0000)
committerKrinkle <krinklemail@gmail.com>
Fri, 2 Dec 2016 02:23:11 +0000 (02:23 +0000)
commitcd7ab52a4a799d4c072fedf717e3f6e2e08b42a9
treec77900745c74e979d3e8490fee79ae341978ee51
parent3a4105ba01fc92f2d41e0faee316d02e29f82fe5
MessageCache invalidation improvements

Re-submission of 9339a08b7.

* Increase time range for getValidationHash() using "latest" values.
  The lower value ran the risk of regenerating from slaves and ending
  up with *older* data than what was there.
* Avoid cache set() calls in replace() unless the lock was acquired.
  Use delete() instead in that case, which invalidates the cache.
* Remember if the cache is volatile in process memory instead of doing
  check key lookups for each "big" message to determine this. Use the
  message hash in the big message keys so purges to the former chain
  down to the latter. An "EXCESSIVE" key/revision map is now used in
  the main cache for big messages. This means that editing an existing
  big message will result in a different hash value. This is needed so
  purges propage correctly.
* Add logging when replace() fails to acquire the lock.
* Factored message cache update code duplication into a new method.
* Use makeKey() in more places, replacing deprecated wfMemcKey().

Change-Id: I82c5baa8137d1ffaaec6adace82ccb0181441342
includes/cache/MessageCache.php
includes/page/WikiPage.php