Improve MultiWriteBagOStuff::merge() cross-DC performance
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 21 Oct 2015 04:50:27 +0000 (21:50 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 21 Oct 2015 04:50:27 +0000 (21:50 -0700)
commit6463cd02f73c21ee148f0f66053dbc1f97019293
tree3c35616d19a3392a48196ade2ab7867a423c4187
parent445136b5bfe2887a8ded26e2db4329a9a231eb93
Improve MultiWriteBagOStuff::merge() cross-DC performance

Implement merge() by getting a lock on the tier 1
cache, getting it's value, generating the new one,
writing to all tiers, and then unlocking tier 1.
This is done by just using the stock mergeViaLock().

This means that if tier 1 is in the same DC, the
other tiers only need 1 request each, just for set().

Change-Id: I4b0c303ef3b86b63e7630032ed0b010e79706324
includes/objectcache/MultiWriteBagOStuff.php