Commit graph

40 commits

Author SHA1 Message Date
Antoine Musso
f874649556 (bug 32853) DBA cache broken in MW 1.18
DBABagOStuff was not refactored by r83140 which pass BagOStuff constructors
an array. This patch honor the 'dir' parameter to let you override the global
$wgTmpDirectory.

Need backport in REL1_18
2011-12-07 11:04:11 +00:00
Tim Starling
53d267b3dc purgeParserCache.php improvements:
* Do queries in batches of 100 rows instead of all at once. Note that if there are a lot of objects with the exact same expiry time, it might take multiple runs of the script to delete them all.
* Progress meter.
2011-12-02 02:59:11 +00:00
Chad Horohoe
de20376cc1 (bug 29747) eAccelerator shared memory caching has been removed since it is now disabled by default and is buggy. APC, XCache and WinCache are not affected.
As Brion points out in <https://bugzilla.wikimedia.org/show_bug.cgi?id=29747#c7>, the shared memory functions are very buggy. In fact, eAccelerator has disabled the shared memory functions by default for awhile now. I didn't touch APC, XCache or WinCache, but I imagine they suffer from the same problems.
2011-11-22 22:56:00 +00:00
Sam Reed
dd6062e75e Bug 13759 - memcached predefined hashes
Patch by Zac Bristow

Half of the patch was already applied. Updated documentation to match
2011-11-19 20:01:33 +00:00
Mark A. Hershberger
037f754c4a eol w/s 2011-11-03 13:58:29 +00:00
Mark A. Hershberger
d9537b113e Meant to include these: feed the OCD: eol w/s 2011-11-01 18:32:05 +00:00
Mark A. Hershberger
58a53f643e feed the OCD: eol w/s 2011-11-01 18:31:38 +00:00
Platonides
cccbb916b0 Parse error (missing ';') in r99938. 2011-10-16 19:53:30 +00:00
Sam Reed
9ceb44a598 Fixup some assignments in conditionals
Add/normalise some more return statements
2011-10-16 03:27:12 +00:00
Roan Kattouw
f8024445dd Per Domas, reinstate <1e9 check that was dropped in r94199. Also document what these checks are all about in more detail. 2011-10-06 14:07:57 +00:00
Aaron Schulz
a6999018e5 Added lock/unlock function stubs. Fixes:
PHP fatal error in /usr/local/apache/common-local/php-1.18/includes/objectcache/MemcachedPhpBagOStuff.php line 91: 
Call to undefined method MemCachedClientforWiki::lock()
2011-09-21 20:25:58 +00:00
Tim Starling
cac02778e4 * Added a script to reduce disk space on a MySQL parser cache setup such as the one at Wikimedia at the moment, by removing all objects which expire before a given time.
* Fixed unintentional shortcut evaluation in MultiWriteBagOStuff::doWrite(). It would have caused writes to be skipped on the second cache if the first cache failed, now writes should be attempted on all caches.
2011-09-09 03:51:45 +00:00
Roan Kattouw
e877e8f5e0 Merge r93797 to trunk, in a somewhat modified form: clamp expiries for memcached to 30 days, higher values give trouble apparently 2011-08-10 21:15:57 +00:00
Brion Vibber
53ab456ebf * (bug 30131) XCache with variable caching disabled no longer used for variable caching (CACHE_ACCEL)
Patch from John Du Hart: https://bugzilla.wikimedia.org/attachment.cgi?id=8849&action=diff

If XCache is present, but the xcache.var_size setting is off, we'll now consider it as xcache being disabled for CACHE_ACCEL purposes. It won't trigger view of the accelerator option in the installer, and at runtime if using CACHE_ACCEL and no other modules are available, it'll throw an error so you know that it doesn't work!
2011-07-31 01:52:38 +00:00
Alexandre Emsenhuber
cda248c53a Removed usage of error suppression operator 2011-07-06 16:29:27 +00:00
Tim Starling
9f4064540e Allow SqlBagOStuff data to be split over many tables, to avoid lock contention performance issues on servers with a high write load. See http://bugs.mysql.com/bug.php?id=61735 and http://bugs.mysql.com/bug.php?id=61736 . 2011-07-04 12:01:10 +00:00
Chad Horohoe
1187d3eeec Revert r87145, bug 28752: Xcache doesn't work in cli mode. As pointed out on CR, this didn't fix it, it just hid the issue. 2011-06-08 00:53:56 +00:00
Sam Reed
051198ce45 Followup r83140, fix undefined $id 2011-05-29 14:28:01 +00:00
Sam Reed
ba2c3a793d And even more documentation in various files 2011-05-29 14:25:20 +00:00
Sam Reed
4065e65d03 Even more documentation in various files 2011-05-29 14:24:27 +00:00
Sam Reed
296f3d3f4f And even more documentation 2011-05-28 18:59:42 +00:00
Sam Reed
3614ecfffb And more documentation. Yaaaay 2011-05-28 17:18:50 +00:00
Sam Reed
ba0cbdeeff More parameter documentation!! 2011-05-28 15:59:57 +00:00
Sam Reed
e514478ba5 Fix function level comments that start with /* not /** 2011-05-21 19:35:16 +00:00
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Chad Horohoe
8ae2840afb Make this private since nothing outside here calls it 2011-04-29 22:40:31 +00:00
Chad Horohoe
2323830a03 (bug 28752) XCache doesn't work in CLI mode 2011-04-29 22:40:12 +00:00
Sam Reed
bc1c6d2a6b More parameter and return type hints 2011-04-25 22:41:54 +00:00
Platonides
ec455d68fa (Bug 28611) Don't die in SqlBagOStuff::incr() if there's a race condition. 2011-04-19 17:59:59 +00:00
Tim Starling
e27500be17 In SQLBagOStuff: make it possible to change the purge period, or disable purging altogether. At Domas's suggestion, for deployment to Wikimedia very soon. 2011-04-12 03:59:47 +00:00
Sam Reed
bccd879a46 Add/tweak/update documentation and add some explicit defintions with type descriptions 2011-03-25 10:56:54 +00:00
Platonides
4cba30ab1b Comment the var_dump() and add a comment.
Follow up r83208.
2011-03-08 00:20:26 +00:00
Platonides
8f0a89efcb Reorder so that wfProfileOut() is the last sentence before the return. 2011-03-06 23:29:29 +00:00
Platonides
9ced2d5c60 Follow up r83140. Add a clear() method to ObjectCache so that it can be used by ForkController. 2011-03-06 23:07:36 +00:00
Tim Starling
f509ce8060 * Added an Ehcache client.
* Fixed encoding of spaces in memcached keys, in r83140 they would have been encoded as "+".
2011-03-04 06:01:30 +00:00
Tim Starling
88161eff47 * When CACHE_ANYTHING is requested, return the cached instance, don't construct a new object for each use.
* In MemcachedSessions.php, register a shutdown function to shut down the session early, before $wgMemc is destroyed. I'm not sure why my recent changes caused this problem to show up now. 
* Use EmptyBagOStuff instead of FakeMemCachedClient in DefaultSettings.php for CACHE_NONE.
2011-03-03 15:24:51 +00:00
Chad Horohoe
10a2ec8072 Tweak debug() to use name of class in debug output 2011-03-03 12:52:30 +00:00
Tim Starling
be76d86932 * Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class.
* Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). 
* Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. 
* Made all object cache classes derive from BagOStuff. 
* Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension.
* Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches.
* Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used.
* Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff.
* Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB.
* Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches.
* Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff.
* Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class.
* Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore
* Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
Tim Starling
d3f36ffd4d More renames and splits for objectcache reorganisation. 2011-03-03 04:48:14 +00:00
Tim Starling
af04dde290 Start of ObjectCache reorganisation. Moved the object cache files to includes/objectcache/. Split BagOStuff.php into single-class files. 2011-03-03 04:38:17 +00:00