Avoid races in MessageCache::replace()
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 28 Oct 2016 05:53:51 +0000 (22:53 -0700)
committerKrinkle <krinklemail@gmail.com>
Wed, 25 Jan 2017 00:46:41 +0000 (00:46 +0000)
commitc962b480568ea13634a682c66f49c266148c3806
tree3b24c546454fa2be54ea837052cf425e07fc8f11
parentdecb55fdf90e0cef65475a1062259a50a32f41a4
Avoid races in MessageCache::replace()

Do the process cache update immediately (as before) but push
the shared cache updates to a deferred update. This update
will thus start with a clear transaction snapshot, so it can
acquire the lock before the first SELECT as is proper.

Also added some missing method visibilities.

Bug: T144952
Change-Id: I462554b300d4688b09ab80cd1bb8a4340ffaa786
includes/cache/MessageCache.php
tests/phpunit/includes/cache/MessageCacheTest.php