From f07408d8602d298d5b915507bf07d54bedfe974d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 11 Sep 2016 15:15:34 -0700 Subject: [PATCH] Remove useless LoadBalancer::parentInfo() method and calls Change-Id: I3550d1249c63ee5bec51dd343b3e26b515c4827e --- includes/db/loadbalancer/LBFactoryMulti.php | 2 -- includes/db/loadbalancer/LBFactorySimple.php | 2 -- includes/db/loadbalancer/LoadBalancer.php | 9 --------- 3 files changed, 13 deletions(-) diff --git a/includes/db/loadbalancer/LBFactoryMulti.php b/includes/db/loadbalancer/LBFactoryMulti.php index e56631d728..e8608401a9 100644 --- a/includes/db/loadbalancer/LBFactoryMulti.php +++ b/includes/db/loadbalancer/LBFactoryMulti.php @@ -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] ); } diff --git a/includes/db/loadbalancer/LBFactorySimple.php b/includes/db/loadbalancer/LBFactorySimple.php index 4632b0adc1..b6fb0d22da 100644 --- a/includes/db/loadbalancer/LBFactorySimple.php +++ b/includes/db/loadbalancer/LBFactorySimple.php @@ -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] ); } diff --git a/includes/db/loadbalancer/LoadBalancer.php b/includes/db/loadbalancer/LoadBalancer.php index 17b1728fd0..42044a7c48 100644 --- a/includes/db/loadbalancer/LoadBalancer.php +++ b/includes/db/loadbalancer/LoadBalancer.php @@ -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 -- 2.20.1