Merge "Simplify Block::getBy and Block::getByName"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / LBFactoryMulti.php
index cc6824d..aec99f4 100644 (file)
@@ -89,9 +89,6 @@ class LBFactoryMulti extends LBFactory {
         */
        private $readOnlyBySection = [];
 
-       /** @var array Load balancer factory configuration */
-       private $conf;
-
        /** @var LoadBalancer[] */
        private $mainLBs = [];
 
@@ -107,12 +104,6 @@ class LBFactoryMulti extends LBFactory {
        /** @var string */
        private $lastSection;
 
-       /** @var int */
-       private $maxLag = self::MAX_LAG_DEFAULT;
-
-       /** @var int Default 'maxLag' when unspecified */
-       const MAX_LAG_DEFAULT = 10;
-
        /**
         * @see LBFactory::__construct()
         *
@@ -166,19 +157,17 @@ class LBFactoryMulti extends LBFactory {
         *                                 storage cluster.
         *   - masterTemplateOverrides     Server configuration map overrides for all master servers.
         *   - loadMonitorClass            Name of the LoadMonitor class to always use.
-        *   - maxLag                      Avoid replica DBs with more lag than this many seconds.
         *   - readOnlyBySection           A map of section name to read-only message.
         *                                 Missing or false for read/write.
         */
        public function __construct( array $conf ) {
                parent::__construct( $conf );
 
-               $this->conf = $conf;
                $required = [ 'sectionsByDB', 'sectionLoads', 'serverTemplate' ];
                $optional = [ 'groupLoadsBySection', 'groupLoadsByDB', 'hostsByName',
                        'externalLoads', 'externalTemplateOverrides', 'templateOverridesByServer',
                        'templateOverridesByCluster', 'templateOverridesBySection', 'masterTemplateOverrides',
-                       'readOnlyBySection', 'maxLag', 'loadMonitorClass' ];
+                       'readOnlyBySection', 'loadMonitorClass' ];
 
                foreach ( $required as $key ) {
                        if ( !isset( $conf[$key] ) ) {
@@ -318,7 +307,6 @@ class LBFactoryMulti extends LBFactory {
                        $this->baseLoadBalancerParams(),
                        [
                                'servers' => $this->makeServerArray( $template, $loads, $groupLoads ),
-                               'maxLag' => $this->maxLag,
                                'loadMonitor' => [ 'class' => $this->loadMonitorClass ],
                                'readOnlyReason' => $readOnlyReason
                        ]