Avoid "Unable to set value to APCBagOStuff" exceptions
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 21 Dec 2015 20:12:06 +0000 (12:12 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 22 Dec 2015 04:41:43 +0000 (20:41 -0800)
commit5ffaa6ae0dcff70a6ce8a38934c7aa7a2a4e5bff
tree6b927082440859e5d9a72875b26f19addc4b39d3
parentc7568c381713d14dd856799f1994e4981f1f6c3a
Avoid "Unable to set value to APCBagOStuff" exceptions

* This can happen due to incr/add races. Use incrWithInit()
  instead to handle such cases.
* Also made BagOStuff:incrWithInit() return the new value like incr().

Change-Id: I0e3b02a4cff7c20544a9db2eaabd3f61e5a470b1
includes/libs/objectcache/BagOStuff.php
includes/utils/UIDGenerator.php
tests/phpunit/includes/libs/objectcache/BagOStuffTest.php