r93563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93562‎ | r93563 | r93564 >
Date:01:52, 31 July 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
* (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!
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)
  • /trunk/phase3/includes/objectcache/ObjectCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.18
@@ -432,6 +432,7 @@
433433 * (bug 27427) mw.util.getParamValue shouldn't return value from hash even if
434434 param is only present in hash.
435435 * Installer checked for magic_quotes_runtime instead of register_globals.
 436+* (bug 30131) XCache with variable caching disabled no longer used for variable caching (CACHE_ACCEL)
436437
437438 === API changes in 1.18 ===
438439 * BREAKING CHANGE: action=watch now requires POST and token.
Index: trunk/phase3/includes/installer/Installer.php
@@ -791,6 +791,9 @@
792792 $caches = array();
793793 foreach ( $this->objectCaches as $name => $function ) {
794794 if ( function_exists( $function ) ) {
 795+ if ( $name == 'xcache' && !wfIniGetBool( 'xcache.var_size' ) ) {
 796+ continue;
 797+ }
795798 $caches[$name] = true;
796799 }
797800 }
Index: trunk/phase3/includes/objectcache/ObjectCache.php
@@ -93,7 +93,7 @@
9494 $id = 'eaccelerator';
9595 } elseif ( function_exists( 'apc_fetch') ) {
9696 $id = 'apc';
97 - } elseif( function_exists( 'xcache_get' ) ) {
 97+ } elseif( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
9898 $id = 'xcache';
9999 } elseif( function_exists( 'wincache_ucache_get' ) ) {
100100 $id = 'wincache';

Follow-up revisions

RevisionCommit summaryAuthorDate
r93564MFT r93563: (bug 30131) XCache with variable caching disabled no longer used ...brion02:02, 31 July 2011
r96559MFT r92422, r93520, r93563, r94107, r94433, r95042, r95332, r95451, r96386...reedy12:49, 8 September 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   01:56, 31 July 2011

Recommend for merge to 1.18 (hence putting it in the 1.18 release notes ;) and to 1.17 (where it'd go out in the next bugfix update).

No need to copy it to 1.17wmf1 manually -- we don't use xcache in production.

#Comment by Brion VIBBER (talk | contribs)   02:03, 31 July 2011

Took the liberty of doing it for 1.18 in r93564.

Status & tagging log