Commit graph

35 commits

Author SHA1 Message Date
Aaron Schulz
a9665bf4d6 Clarified WAN cache docs by using "datacenter" consistently
Change-Id: I448c57cebd0481809fc17a7c2ac698c73b17dcba
2015-09-28 18:22:52 -07:00
Aaron Schulz
75f06d5294 Added $opts to WANObjectCache::set() to detect snapshot lag
* This can avoid some stale write race conditions
* Made use of this option in a few key places
* HOLDOFF_TTL was also bumped

Change-Id: I83505a59cce0119e456191c3100f7d97bc86bdbf
2015-09-28 23:03:36 +00:00
Aaron Schulz
d02b98b8f3 Updated key WANObjectCache::delete() callers to avoid races
* They now issue the delete() write before COMMIT of
  the relevant DB (or immediately if no trx is active)
* This can avoid some stale write race conditions
* Updated the WAN cache delete() docs

Change-Id: Id54887976051120b76528070d5f2ceb357d57897
2015-09-26 18:02:00 +00:00
Aaron Schulz
859cc75432 Assorted WANObjectCache doc tweaks
Change-Id: If207fc64279e344218d3b617eae7e69f88b23b27
2015-09-26 04:53:58 +00:00
Aaron Schulz
1ed292fa9e Improvements to WANObjectCache::getWithSetCallback()
* If lockTSE is set, make sure it applies during during
  the entire duration of a key being tombstoned. This lets
  regenerations happen during that whole time, which lowers
  the chance of seeing stale data if the DBs are lagged.
* If lockTSE is not set, do not apply tempTTL (for tomstoned keys).
  If traffic is high, a stale value would usually be "stashed" and
  used for 5 seconds. If the lag was only 1 second, then this
  is suboptimal.
* Determine tempTTL from lockTSE as they no longer make sense
  being separate. This makes things easier to understand and
  also makes the lockTSE value account for the last regeneration
  time (via stash key TTL). Since LOCK_TSE << HOLDOFF_TTL, this
  helps avoid stale reads without adding stampede risk.

Change-Id: I3b01f0ec67935a238b30e02e42004fd3b2dcfb9d
2015-09-23 15:24:01 +00:00
jenkins-bot
e3d0743904 Merge "objectcache: Fix some doc bullet points in WANObjectCache" 2015-09-23 05:28:18 +00:00
Aaron Schulz
901dcffd80 objectcache: Fix some doc bullet points in WANObjectCache
Change-Id: Id3e65b0768d45087aaf83ed3f432923c82acc713
2015-09-23 05:17:48 +00:00
Aaron Schulz
c1931c2933 objectcache: Add comments about DB isolation to WANObjectCache
Change-Id: Ic3454d0ebfdb05488dd650f77e09264842caea1c
2015-09-23 05:16:35 +00:00
Aaron Schulz
73b27a3d32 Small cleanups to WANObjectCache
* Added a few comments
* Renamed $locked => $lockAcquired for clarity

Change-Id: I45710974971731205d072a1f4b0f9cb37e2cb2a2
2015-09-17 11:00:23 -07:00
Aaron Schulz
2df6d54182 Moved some WANObjectCache number literals to constants
Change-Id: I848440408b54c1dfd4961c15cc83aad9a1a19425
2015-09-16 10:05:54 -07:00
jenkins-bot
5254ff682c Merge "Clarified WANObjectCache::delete() comments" 2015-09-01 00:44:09 +00:00
Aaron Schulz
8e93245603 objectcache: Correct tempTTL comment for getWithSetCallback()
* This applies regardless of lockTSE

Change-Id: I5adb62fbb956407cd978211a0497e8bd9de3c1a5
2015-08-31 20:52:13 +00:00
Aaron Schulz
274f1009c9 Clarified WANObjectCache::delete() comments
Change-Id: I8c1cffa284cf92461045f9163ff1d1e9bf8c2244
2015-08-31 13:26:22 -07:00
jenkins-bot
a7c124f2e9 Merge "Added $ttl sanity check to WANObjectCache::delete()" 2015-08-25 22:12:35 +00:00
Aaron Schulz
da531a8be5 Fixed "undefined class" IDE errror from INF use in @param
Change-Id: I5d044da0946d046f4a8581445ede39d56973a126
2015-08-24 04:15:28 -07:00
Aaron Schulz
b085d5f9a2 Added $ttl sanity check to WANObjectCache::delete()
Change-Id: I48c80bd6ba5f79c94e87d75816f2e2069200c9aa
2015-08-19 16:37:59 -07:00
jenkins-bot
8a6548ee45 Merge "Added a tombstone comment to WANObjectCache" 2015-08-19 00:46:12 +00:00
Aaron Schulz
6ff5c6afe3 Made WANObjectCache::get() comments more accurate
Change-Id: I531c2dca6b552a6b3732d2506e7373c7d17b4b4c
2015-08-15 12:33:58 -07:00
Aaron Schulz
72c493a3e4 Added a tombstone comment to WANObjectCache
Change-Id: Ia8c2fc4d4bbb741a6cd7aaa6f3ae433e65743b29
2015-08-13 15:54:44 -07:00
Aaron Schulz
7d5f3efa2f objectcache: Add WANObjectCache::resetCheckKey() method
Change-Id: I6f8b97c1f4511534e1ab2656f472adee491f9d9f
2015-07-13 21:25:20 +00:00
Aaron Schulz
84758e6f10 Made WANObjectCache::getCheckKey() automatically init the key
* This still allows If-Modified-Since logic but does not
  need to broadcast initialization values just because a
  key fell out of cache. The value can differ between DCs
  anyway via skew, this just lets them drift more. Actual
  purge events are still broadcasted, which is what matters.
* The User class has now been simplified given this change.
* Added more general comments to getCheckKeyTime().

Change-Id: Ic1f4bbb1947e0d1dd47499c9e9dc86991c30580c
2015-07-02 07:13:22 +00:00
Alex Monk
6a92393760 Set 644 file permissions on some *.php files
Bug: T103754
Change-Id: I2f5bae84463ea849ceae027c17b924779adf8c19
2015-06-27 20:46:05 +00:00
jenkins-bot
5161541d87 Merge "Converted FileBackendStore to using the WAN cache" 2015-05-18 08:34:10 +00:00
Aaron Schulz
60608c1274 Cleanups to WANObjectCache::getWithSetCallback code
* Do not use lock() for tombstoned keys unless lockTSE was set
* Moved the is_callable() check down a bit further
* Also removed one inaccurate comment

Change-Id: I904e0681faa48b1dc2bc2a3c005a29d2f8347065
2015-05-15 06:07:13 +00:00
Aaron Schulz
a2c4237098 Added WANObjectCache::TTL_UNCACHEABLE for uncacheable content
Change-Id: If7b75654c91cc5762cb49d90f40e1b7ea518ebc8
2015-05-13 20:29:17 -07:00
jenkins-bot
79697edcbf Merge "Allow for dynamic TTLs in getWithSetCallback()" 2015-05-14 03:23:36 +00:00
Aaron Schulz
e941534195 objectcache: Add WANObjectCache::TTL_NONE constant for readability
Change-Id: I07592ebb2794a7a8efc0fd1d718c1b5ca3d9b83f
2015-05-13 13:37:11 +00:00
Aaron Schulz
4db819011a Allow for dynamic TTLs in getWithSetCallback()
* This gives it better parity with BagOStuff::set()
* Also updated some doc comments

Change-Id: Ib94b97715fae901bac1750656e3dc7501919d6d2
2015-05-12 13:04:53 -07:00
Aaron Schulz
9b7d95fc96 More "check key" doc comments
Change-Id: Ide66bc396e811776a58fd6aa7c1af2337ea185bd
2015-05-11 19:15:35 -07:00
Aaron Schulz
77a949dea6 Added more lockTSE comments to getWithSetCallback()
Change-Id: I6ac56784bc231d7dec7869c6d2b901341bde6e9b
2015-05-06 20:38:53 -07:00
Aaron Schulz
48cffdff82 Converted FileBackendStore to using the WAN cache
Bug: T93141
Change-Id: I76efb0dc45a697c5fdfc50932e1198a6d663a445
2015-04-30 01:30:38 +00:00
Aaron Schulz
fcd0231305 Made getWithSetCallback doc comment clearer
Change-Id: I68c3929691c886bcfee32499a6058f01f69ea63c
2015-04-29 11:45:42 -07:00
Aaron Schulz
a2ea6116af Fixed some <code> tags for doxygen
Change-Id: I550b8760556e4916ee9b63ee244bbbcb4d926142
2015-04-29 06:01:59 +01:00
Kunal Mehta
8f0ed9c838 Fix @return documentation in WANObjectCache::prefixCacheKeys()
Change-Id: Iff27ad3b034b4702f329437950b69731de29171c
2015-04-28 04:17:28 +00:00
Aaron Schulz
c7bf955bca Moved WAN cache and relayer to /libs
Change-Id: I9586d22890ce1cda7f74869ff701de73d65eaaef
2015-04-27 12:35:58 -07:00
Renamed from includes/objectcache/WANObjectCache.php (Browse further)