Commit graph

57 commits

Author SHA1 Message Date
Aaron Schulz
545ffd2d4c Fudge testGetWithSeveralCheckKeys() in both directions to be deterministic
Change-Id: I0f25cbd4555033f492b1b5d4ab55669240f19fc8
2015-11-20 14:21:31 -08:00
Timo Tijhof
a0cce5e4b6 objectcache: Implement check keys per cache key in WANObjectCache::getMulti()
To allow batch queries for multiple keys that themselves have different check
keys. Previously check keys always applied to all keys being retrieved.

Change-Id: I9e5ba198d79020ce05a802a510762e29fcfb2f1b
2015-11-17 04:15:33 +00:00
Aaron Schulz
6ae5dde077 objectcache: Add more WAN cache check key unit tests
Change-Id: If9bfef463b294391a456c5f04f48858f9dbe73fd
2015-11-17 03:28:18 +00:00
Timo Tijhof
6c3b45d4d3 objectcache: Add more @covers to WANObjectCache unit tests
Has only ~ 30% coverage according to PHPUnit, but mostly due to
lack of @covers annotations.

Change-Id: I871b45d8d8ee22c7cda644c450d78f577584e78c
2015-11-16 21:49:52 +00:00
Aaron Schulz
6d0108d533 Fix slow callbacks in getWithSetCallback() using lockTSE
* Keys that take a long time to generate would run into
  the MAX_SNAPSHOT_LAG check and have set() no-op. This
  would be fine except that leaves no key there to figure
  out the time since expiry and therefore whether to use
  the mutex, so it didn't. This now saves the keys but with
  a FLG_STALE bit set, making the next caller that sees it
  perform a regeneration (unless it can't get the mutex).
* Bumped LOCK_TTL so that keys can stay locked much longer.
* This is easy to test via sleep(5) in tagUsageStatistics()
  and two Special:Tags browser tabs.

Bug: T91535
Change-Id: I549e70ace3d2e7da40d3c4346ebacc36024cd522
2015-10-28 23:31:37 +00:00
Aaron Schulz
05a3ee2468 Make WAN cache HOLDOFF_TTL smaller by combining db/snapshot lag
* In the common ~0 second lag case, transactions up to ~7 seconds
  long will have normal set() behavior (instead of just ~5 seconds).
* Like wise with ~0 second transactions tolerating ~7 seconds of
  lag (instead of just ~5).
* The lower hold-off time lets caching resume 3 seconds sooner.

Change-Id: I21e2a0a6915492cec422b6a6af5541937745c15b
2015-10-27 11:38:54 -07:00
Aaron Schulz
cce813a922 Move MultiWriteBagOStuff to /libs
Also moved related tests files to /libs.

Change-Id: I806eeaa30205733d497adde933baf0c4157f7aae
2015-10-24 12:15:26 -07:00
Renamed from tests/phpunit/includes/objectcache/WANObjectCacheTest.php (Browse further)