MessageCache invalidation improvements
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 27 Oct 2016 06:38:30 +0000 (23:38 -0700)
committerKrinkle <krinklemail@gmail.com>
Wed, 16 Nov 2016 18:22:17 +0000 (18:22 +0000)
commit9339a08b72c918d7743a9cb286161adb9399a77b
tree9c3be395d71fb63490b8a7f46d7c6f35be8fbf88
parent87beb0742e3f356588c55cdc1f2950ca1a20c6e3
MessageCache invalidation improvements

* 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: Idc337a787171949c4f70186b13d7b65304c9b57f
includes/cache/MessageCache.php
includes/page/WikiPage.php