Avoid stack overflow in LoadBalancer with CACHE_DB WAN/server cache
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 2 Aug 2016 10:57:52 +0000 (03:57 -0700)
committerAddshore <addshorewiki@gmail.com>
Tue, 2 Aug 2016 13:06:49 +0000 (13:06 +0000)
commit5f921702d29fb4a11d73efaa9d2ca758c01c15f6
tree3160ed0786ba824ab06442b02a1b47cfdef1af46
parent4817afdfda0b01f499223c0860f1168a34c391ab
Avoid stack overflow in LoadBalancer with CACHE_DB WAN/server cache

* Add the ability to expose key BagOStuff attributes like whether the
  emulation SQL cache is being used. Several callers use hacks to detect
  this and can be updated later.
* Fallback to a safe empty WAN cache in the CACHE_DB case. This fixes
  a regression from f4bf52e8438.
* Also add this protection to the server cache, which could break
  similarly before too.
* Also fix CACHE_ANYTHING by avoid the recursion risk from
  fc1d4d796024 by just checking the disabled service map.

Bug: T123829
Bug: T141804
Change-Id: I17ee26138f69e01ec1aaddb55ab27caa4d542193
includes/Services/ServiceContainer.php
includes/db/loadbalancer/LoadBalancer.php
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/CachedBagOStuff.php
includes/libs/objectcache/IExpiringStore.php
includes/libs/objectcache/MultiWriteBagOStuff.php
includes/libs/objectcache/ReplicatedBagOStuff.php
includes/libs/objectcache/WANObjectCache.php
includes/objectcache/ObjectCache.php
includes/objectcache/SqlBagOStuff.php