X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FReplicatedBagOStuff.php;h=8239491f720b2977c63cf500d9ea4051d865f971;hp=f2ba9de032a2993b000f2ad47f3ec5cbb1ae3075;hb=82e2c924e473fa3b99bb8e0da71d99b70ec5ca07;hpb=99dbf4e1d4d7f18e02935bdb8cd3be4413ffe729 diff --git a/includes/libs/objectcache/ReplicatedBagOStuff.php b/includes/libs/objectcache/ReplicatedBagOStuff.php index f2ba9de032..8239491f72 100644 --- a/includes/libs/objectcache/ReplicatedBagOStuff.php +++ b/includes/libs/objectcache/ReplicatedBagOStuff.php @@ -17,12 +17,11 @@ * * @file * @ingroup Cache - * @author Aaron Schulz */ /** * A cache class that directs writes to one set of servers and reads to - * another. This assumes that the servers used for reads are setup to slave + * another. This assumes that the servers used for reads are setup to replica DB * those that writes go to. This can easily be used with redis for example. * * In the WAN scenario (e.g. multi-datacenter case), this is useful when @@ -42,7 +41,7 @@ class ReplicatedBagOStuff extends BagOStuff { * - writeFactory : ObjectFactory::getObjectFromSpec array yeilding BagOStuff. * This object will be used for writes (e.g. the master DB). * - readFactory : ObjectFactory::getObjectFromSpec array yeilding BagOStuff. - * This object will be used for reads (e.g. a slave DB). + * This object will be used for reads (e.g. a replica DB). * * @param array $params * @throws InvalidArgumentException @@ -59,12 +58,13 @@ class ReplicatedBagOStuff extends BagOStuff { __METHOD__ . ': the "readFactory" parameter is required' ); } + $opts = [ 'reportDupes' => false ]; // redundant $this->writeStore = ( $params['writeFactory'] instanceof BagOStuff ) ? $params['writeFactory'] - : ObjectFactory::getObjectFromSpec( $params['writeFactory'] ); + : ObjectFactory::getObjectFromSpec( $opts + $params['writeFactory'] ); $this->readStore = ( $params['readFactory'] instanceof BagOStuff ) ? $params['readFactory'] - : ObjectFactory::getObjectFromSpec( $params['readFactory'] ); + : ObjectFactory::getObjectFromSpec( $opts + $params['readFactory'] ); $this->attrMap = $this->mergeFlagMaps( [ $this->readStore, $this->writeStore ] ); }