From: Aaron Schulz Date: Sat, 2 Dec 2017 20:34:22 +0000 (-0800) Subject: Only send statsd data for WAN cache in non-CLI mode X-Git-Tag: 1.31.0-rc.0~1306^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=8ed0b8db053fe5ee1f5c16cd97481b21cdf2503b;p=lhc%2Fweb%2Fwiklou.git Only send statsd data for WAN cache in non-CLI mode Bug: T181385 Change-Id: Ic51a084206cea93621393359ded4ff77beef5f13 --- diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index 07432c0b24..67d2346013 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -342,14 +342,15 @@ class ObjectCache { $params['channels'][$action] = $channel; } $params['cache'] = self::newFromParams( $params['store'] ); - $params['stats'] = $services->getStatsdDataFactory(); if ( isset( $params['loggroup'] ) ) { $params['logger'] = LoggerFactory::getInstance( $params['loggroup'] ); } else { $params['logger'] = LoggerFactory::getInstance( 'objectcache' ); } - // Let pre-emptive refreshes happen post-send on HTTP requests if ( !$wgCommandLineMode ) { + // Send the statsd data post-send on HTTP requests; avoid in CLI mode (T181385) + $params['stats'] = $services->getStatsdDataFactory(); + // Let pre-emptive refreshes happen post-send on HTTP requests $params['asyncHandler'] = [ DeferredUpdates::class, 'addCallableUpdate' ]; } $class = $params['class'];