Last modified: 2013-09-04 11:49:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32131, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30131 - XCache used as ObjectCache even if variable storage is disabled
XCache used as ObjectCache even if variable storage is disabled
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.17.x
All All
: Unprioritized minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-30 17:03 UTC by John Du Hart
Modified: 2013-09-04 11:49 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to check xcache.var_size (1.04 KB, application/octet-stream)
2011-07-30 17:03 UTC, John Du Hart
Details
Reattached marked as a patch so bugzilla recognizes it (1.04 KB, patch)
2011-07-30 17:04 UTC, John Du Hart
Details

Description John Du Hart 2011-07-30 17:03:39 UTC
Created attachment 8848 [details]
Patch to check xcache.var_size

Right now if $wgMainCacheType (Or any of the caches) are set to CACHE_ACCEL, it only checks if the function exists. In some cases where XCache is installed however variable storage is off (xcache.var_size = 0), MediaWiki will continue to blindly try and use XCache, resulting in a slew of warnings such as this:

> Warning: xcache_get(): xcache.var_size is either 0 or too small to enable var data caching in /customers/d/b/e/hugsmile.eu/httpd.www/mediawiki-1.17.0/includes/BagOStuff.php on line 619

We should probably not continue using it if there's alternatives or just plain notify the site owner that his caching method isn't working. At the least, checking for this at install time should be done. The included patch does both.
Comment 1 John Du Hart 2011-07-30 17:04:46 UTC
Created attachment 8849 [details]
Reattached marked as a patch so bugzilla recognizes it
Comment 2 Brion Vibber 2011-07-31 01:54:37 UTC
Looks good -- did a quick test on Ubuntu 11.04 w/ php5-xcache module enabled.

Default config of that package actually has the xcache.var_size set to 0, so that's a good thing to check for! With patch in, this condition gets treated as if xcache just wasn't there, which seems like the right behavior. When the xcache.var_size is cranked up (say 32M), it's still detected.

Note for potential testers: the installer does detection near the beginning. To ensure that it's seeing your PHP configuration updates, restart the install after each config + Apache restart.

Applied on trunk in r93563.
Comment 3 Brion Vibber 2011-07-31 01:55:29 UTC
Recommending for backport to 1.18 and 1.17; marking in CR.
Comment 4 Brion Vibber 2011-07-31 02:04:01 UTC
Took the liberty of doing it for 1.18 in r93564.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links