Remove useless LoadBalancer::parentInfo() method and calls
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 11 Sep 2016 22:15:34 +0000 (15:15 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 11 Sep 2016 22:15:34 +0000 (15:15 -0700)
Change-Id: I3550d1249c63ee5bec51dd343b3e26b515c4827e

includes/db/loadbalancer/LBFactoryMulti.php
includes/db/loadbalancer/LBFactorySimple.php
includes/db/loadbalancer/LoadBalancer.php

index e56631d..e860840 100644 (file)
@@ -254,7 +254,6 @@ class LBFactoryMulti extends LBFactory {
                $section = $this->getSectionForWiki( $wiki );
                if ( !isset( $this->mainLBs[$section] ) ) {
                        $lb = $this->newMainLB( $wiki );
-                       $lb->parentInfo( [ 'id' => "main-$section" ] );
                        $this->chronProt->initLB( $lb );
                        $this->mainLBs[$section] = $lb;
                }
@@ -296,7 +295,6 @@ class LBFactoryMulti extends LBFactory {
        public function getExternalLB( $cluster, $wiki = false ) {
                if ( !isset( $this->extLBs[$cluster] ) ) {
                        $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
-                       $this->extLBs[$cluster]->parentInfo( [ 'id' => "ext-$cluster" ] );
                        $this->chronProt->initLB( $this->extLBs[$cluster] );
                }
 
index 4632b0a..b6fb0d2 100644 (file)
@@ -95,7 +95,6 @@ class LBFactorySimple extends LBFactory {
        public function getMainLB( $wiki = false ) {
                if ( !isset( $this->mainLB ) ) {
                        $this->mainLB = $this->newMainLB( $wiki );
-                       $this->mainLB->parentInfo( [ 'id' => 'main' ] );
                        $this->chronProt->initLB( $this->mainLB );
                }
 
@@ -125,7 +124,6 @@ class LBFactorySimple extends LBFactory {
        public function getExternalLB( $cluster, $wiki = false ) {
                if ( !isset( $this->extLBs[$cluster] ) ) {
                        $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
-                       $this->extLBs[$cluster]->parentInfo( [ 'id' => "ext-$cluster" ] );
                        $this->chronProt->initLB( $this->extLBs[$cluster] );
                }
 
index 17b1728..42044a7 100644 (file)
@@ -177,15 +177,6 @@ class LoadBalancer {
                return $this->mLoadMonitor;
        }
 
-       /**
-        * Get or set arbitrary data used by the parent object, usually an LBFactory
-        * @param mixed $x
-        * @return mixed
-        */
-       public function parentInfo( $x = null ) {
-               return wfSetVar( $this->mParentInfo, $x );
-       }
-
        /**
         * @param array $loads
         * @param bool|string $wiki Wiki to get non-lagged for