Smalyshev has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/394380 )
Change subject: Disable statsd collection instead of replacing statsd
......................................................................
Disable statsd collection instead of replacing statsd
Since statsd service is initialized very early, we can't
overwrite it anyway.
Bug: T181716
Change-Id: I9a2177486dee1f8329dc9af553e434d91bd397cd
---
M includes/Maintenance/Maintenance.php
1 file changed, 2 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/80/394380/1
diff --git a/includes/Maintenance/Maintenance.php
b/includes/Maintenance/Maintenance.php
index 894049a..5c55240 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -197,21 +197,13 @@
global $wgPoolCounterConf, $wgCirrusSearchLogElasticRequests;
// Make sure we don't flood the pool counter
- $wgPoolCounterConf = [];
unset( $wgPoolCounterConf['CirrusSearch-Search'] );
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
// Disable statsd data collection.
- try {
- $services = \MediaWiki\MediaWikiServices::getInstance();
- $services->redefineService( "StatsdDataFactory",
- function ( MediaWikiServices $services ) {
- return new \NullStatsdDataFactory();
- } );
- } catch ( CannotReplaceActiveServiceException $e ) {
- // ignore it, failing to disable stats is tolerable
- }
+ $stats =
MediaWikiServices::getInstance()->getStatsdDataFactory();
+ $stats->setEnabled( false );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/394380
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a2177486dee1f8329dc9af553e434d91bd397cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Smalyshev <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits