Fix get()/getMulti() check key race condition in WANObjectCache
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 4 Dec 2015 22:22:02 +0000 (14:22 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 4 Dec 2015 22:46:18 +0000 (14:46 -0800)
commitba06ccb394df994b6434f1d3434c6b21e064f963
treebb4c1aa7c0678c10686bd06ce1b4d8e397e2da19
parentd2c33200f77aa72996e081041ebcf533f42bd733
Fix get()/getMulti() check key race condition in WANObjectCache

If a set() happened around the exact same time as check key was
initialized via get(), the curTTL in future get() calls could
sometimes be 0 instead of a negative value, even though hold-off
should apply.

Change-Id: Ide1fd65112aff425a4798e2ec406d71f2a8e84a7
includes/libs/objectcache/WANObjectCache.php
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php