jenkins-bot has submitted this change and it was merged. Change subject: Cleanup unused LBFactory $domain arguments ......................................................................
Cleanup unused LBFactory $domain arguments Change-Id: I17b409a71e263ff5e0175f6a35fb9c5288f00c11 --- M includes/libs/rdbms/lbfactory/ILBFactory.php M includes/libs/rdbms/lbfactory/LBFactory.php M includes/libs/rdbms/lbfactory/LBFactoryMulti.php M includes/libs/rdbms/lbfactory/LBFactorySimple.php M includes/libs/rdbms/lbfactory/LBFactorySingle.php 5 files changed, 21 insertions(+), 50 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/lbfactory/ILBFactory.php b/includes/libs/rdbms/lbfactory/ILBFactory.php index 9c9f18d..ff1bd43 100644 --- a/includes/libs/rdbms/lbfactory/ILBFactory.php +++ b/includes/libs/rdbms/lbfactory/ILBFactory.php @@ -86,28 +86,25 @@ /** * Create a new load balancer for external storage. The resulting object will be - * untracked, not chronology-protected, and the caller is responsible for - * cleaning it up. + * untracked, not chronology-protected, and the caller is responsible for cleaning it up. * * This method is for only advanced usage and callers should almost always use * getExternalLB() instead. This method can be useful when a table is used as a * key/value store. In that cases, one might want to query it in autocommit mode * (DBO_TRX off) but still use DBO_TRX transaction rounds on other tables. * - * @param string $cluster External storage cluster, or false for core - * @param bool|string $domain Domain ID, or false for the current domain + * @param string $cluster External storage cluster name * @return ILoadBalancer */ - public function newExternalLB( $cluster, $domain = false ); + public function newExternalLB( $cluster ); /** * Get a cached (tracked) load balancer for external storage * - * @param string $cluster External storage cluster, or false for core - * @param bool|string $domain Domain ID, or false for the current domain + * @param string $cluster External storage cluster name * @return ILoadBalancer */ - public function getExternalLB( $cluster, $domain = false ); + public function getExternalLB( $cluster ); /** * Execute a function for each tracked load balancer diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index f3a3275..d21289b 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -153,18 +153,16 @@ /** * @see ILBFactory::newExternalLB() * @param string $cluster - * @param bool $domain * @return LoadBalancer */ - abstract public function newExternalLB( $cluster, $domain = false ); + abstract public function newExternalLB( $cluster ); /** * @see ILBFactory::getExternalLB() * @param string $cluster - * @param bool $domain * @return LoadBalancer */ - abstract public function getExternalLB( $cluster, $domain = false ); + abstract public function getExternalLB( $cluster ); /** * Call a method of each tracked load balancer diff --git a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php index 83ca650..a7cc16c 100644 --- a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php +++ b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php @@ -255,13 +255,7 @@ return $this->mainLBs[$section]; } - /** - * @param string $cluster - * @param DatabaseDomain|string|bool $domain Domain ID, or false for the current domain - * @throws InvalidArgumentException - * @return LoadBalancer - */ - public function newExternalLB( $cluster, $domain = false ) { + public function newExternalLB( $cluster ) { if ( !isset( $this->externalLoads[$cluster] ) ) { throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" ); } @@ -281,14 +275,9 @@ ); } - /** - * @param string $cluster External storage cluster, or false for core - * @param DatabaseDomain|string|bool $domain Domain ID, or false for the current domain - * @return LoadBalancer - */ - public function getExternalLB( $cluster, $domain = false ) { + public function getExternalLB( $cluster ) { if ( !isset( $this->extLBs[$cluster] ) ) { - $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $domain ); + $this->extLBs[$cluster] = $this->newExternalLB( $cluster ); $this->getChronologyProtector()->initLB( $this->extLBs[$cluster] ); } diff --git a/includes/libs/rdbms/lbfactory/LBFactorySimple.php b/includes/libs/rdbms/lbfactory/LBFactorySimple.php index 674bafd..1e69d8f 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySimple.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySimple.php @@ -91,13 +91,7 @@ return $this->mainLB; } - /** - * @param string $cluster - * @param bool|string $domain - * @return LoadBalancer - * @throws InvalidArgumentException - */ - public function newExternalLB( $cluster, $domain = false ) { + public function newExternalLB( $cluster ) { if ( !isset( $this->externalClusters[$cluster] ) ) { throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"." ); } @@ -105,14 +99,9 @@ return $this->newLoadBalancer( $this->externalClusters[$cluster] ); } - /** - * @param string $cluster - * @param bool|string $domain - * @return LoadBalancer - */ - public function getExternalLB( $cluster, $domain = false ) { + public function getExternalLB( $cluster ) { if ( !isset( $this->extLBs[$cluster] ) ) { - $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $domain ); + $this->extLBs[$cluster] = $this->newExternalLB( $cluster ); $this->getChronologyProtector()->initLB( $this->extLBs[$cluster] ); } diff --git a/includes/libs/rdbms/lbfactory/LBFactorySingle.php b/includes/libs/rdbms/lbfactory/LBFactorySingle.php index a64117f..e116888 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySingle.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySingle.php @@ -55,36 +55,34 @@ } /** - * @param bool|string $wiki + * @param bool|string $domain (unused) * @return LoadBalancerSingle */ - public function newMainLB( $wiki = false ) { + public function newMainLB( $domain = false ) { return $this->lb; } /** - * @param bool|string $wiki + * @param bool|string $domain (unused) * @return LoadBalancerSingle */ - public function getMainLB( $wiki = false ) { + public function getMainLB( $domain = false ) { return $this->lb; } /** - * @param string $cluster External storage cluster, or false for core - * @param bool|string $wiki Wiki ID, or false for the current wiki + * @param string $cluster External storage cluster name (unused) * @return LoadBalancerSingle */ - public function newExternalLB( $cluster, $wiki = false ) { + public function newExternalLB( $cluster ) { return $this->lb; } /** - * @param string $cluster External storage cluster, or false for core - * @param bool|string $wiki Wiki ID, or false for the current wiki + * @param string $cluster External storage cluster name (unused) * @return LoadBalancerSingle */ - public function getExternalLB( $cluster, $wiki = false ) { + public function getExternalLB( $cluster ) { return $this->lb; } -- To view, visit https://gerrit.wikimedia.org/r/317660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17b409a71e263ff5e0175f6a35fb9c5288f00c11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits