rdbms: Rename "memCache" to "memStash" in LBFactory
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 17 Aug 2017 03:07:30 +0000 (20:07 -0700)
committerKrinkle <krinklemail@gmail.com>
Thu, 17 Aug 2017 20:18:21 +0000 (20:18 +0000)
This needs to be cross DC, so fix the name and comments.
Also update the one MWLBFactory reference to it.

Change-Id: I5ef10000276c300299fd1ece35ada0d78388bef7

includes/db/MWLBFactory.php
includes/libs/rdbms/lbfactory/ILBFactory.php
includes/libs/rdbms/lbfactory/LBFactory.php

index 464a918..5196ac2 100644 (file)
@@ -149,7 +149,7 @@ abstract class MWLBFactory {
                }
                $cCache = ObjectCache::getLocalClusterInstance();
                if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) {
-                       $lbConf['memCache'] = $cCache;
+                       $lbConf['memStash'] = $cCache;
                }
                $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
                if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
index 117df68..ff6635d 100644 (file)
@@ -44,7 +44,7 @@ interface ILBFactory {
         *  - localDomain: A DatabaseDomain or domain ID string.
         *  - readOnlyReason : Reason the master DB is read-only if so [optional]
         *  - srvCache : BagOStuff object for server cache [optional]
-        *  - memCache : BagOStuff object for cluster memory cache [optional]
+        *  - memStash : BagOStuff object for cross-datacenter memory storage [optional]
         *  - wanCache : WANObjectCache object [optional]
         *  - hostname : The name of the current server [optional]
         *  - cliMode: Whether the execution context is a CLI script. [optional]
index 919f103..c891fb6 100644 (file)
@@ -55,7 +55,7 @@ abstract class LBFactory implements ILBFactory {
        /** @var BagOStuff */
        protected $srvCache;
        /** @var BagOStuff */
-       protected $memCache;
+       protected $memStash;
        /** @var WANObjectCache */
        protected $wanCache;
 
@@ -93,7 +93,7 @@ abstract class LBFactory implements ILBFactory {
                }
 
                $this->srvCache = isset( $conf['srvCache'] ) ? $conf['srvCache'] : new EmptyBagOStuff();
-               $this->memCache = isset( $conf['memCache'] ) ? $conf['memCache'] : new EmptyBagOStuff();
+               $this->memStash = isset( $conf['memStash'] ) ? $conf['memStash'] : new EmptyBagOStuff();
                $this->wanCache = isset( $conf['wanCache'] )
                        ? $conf['wanCache']
                        : WANObjectCache::newEmpty();
@@ -435,7 +435,7 @@ abstract class LBFactory implements ILBFactory {
                }
 
                $this->chronProt = new ChronologyProtector(
-                       $this->memCache,
+                       $this->memStash,
                        [
                                'ip' => $this->requestInfo['IPAddress'],
                                'agent' => $this->requestInfo['UserAgent'],