Aaron Schulz has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/372220 )
Change subject: [DNM] Use the main stash for LBFactory "memStash" parameter
......................................................................
[DNM] Use the main stash for LBFactory "memStash" parameter
This store is used for ChronologyProtector positions.
It should be cross-DC since the sticky DC cookie may not work
for rapid cross-wiki farm activity, causing some request go to
the non-primary DC.
NOTE: this change should be deployed on all farm wikis at once
Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1
---
M includes/db/MWLBFactory.php
1 file changed, 7 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/20/372220/1
diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php
index 5196ac2..aa1918d 100644
--- a/includes/db/MWLBFactory.php
+++ b/includes/db/MWLBFactory.php
@@ -142,16 +142,18 @@
}
}
+ $services = MediaWikiServices::getInstance();
+
// Use APC/memcached style caching, but avoids loops with
CACHE_DB (T141804)
- $sCache =
MediaWikiServices::getInstance()->getLocalServerObjectCache();
+ $sCache = $services->getLocalServerObjectCache();
if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) >
$sCache::QOS_EMULATION_SQL ) {
$lbConf['srvCache'] = $sCache;
}
- $cCache = ObjectCache::getLocalClusterInstance();
- if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) >
$cCache::QOS_EMULATION_SQL ) {
- $lbConf['memStash'] = $cCache;
+ $mStash = $services->getMainObjectStash();
+ if ( $mStash->getQoS( $mStash::ATTR_EMULATION ) >
$mStash::QOS_EMULATION_SQL ) {
+ $lbConf['memStash'] = $mStash;
}
- $wCache =
MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $wCache = $services->getMainWANObjectCache();
if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) >
$wCache::QOS_EMULATION_SQL ) {
$lbConf['wanCache'] = $wCache;
}
--
To view, visit https://gerrit.wikimedia.org/r/372220
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits