From: Kunal Mehta Date: Fri, 16 Sep 2016 00:41:17 +0000 (-0700) Subject: refreshLinks: Use vslow group for DB_REPLICA connections X-Git-Tag: 1.31.0-rc.0~5403^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=fb1d035abf27f2d535c9cb727afd3a56da159390;p=lhc%2Fweb%2Fwiklou.git refreshLinks: Use vslow group for DB_REPLICA connections Change-Id: If2f3bba7f0b518f26f0672150c94b999ac79f325 --- diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 106be1f132..e7a4d06902 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -90,7 +90,7 @@ class RefreshLinks extends Maintenance { $end = null, $redirectsOnly = false, $oldRedirectsOnly = false ) { $reportingInterval = 100; - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] ); if ( $start === null ) { $start = 1; @@ -282,7 +282,7 @@ class RefreshLinks extends Maintenance { ) { wfWaitForSlaves(); $this->output( "Deleting illegal entries from the links tables...\n" ); - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] ); do { // Find the start of the next chunk. This is based only // on existent page_ids. @@ -324,7 +324,7 @@ class RefreshLinks extends Maintenance { */ private function dfnCheckInterval( $start = null, $end = null, $batchSize = 100 ) { $dbw = $this->getDB( DB_MASTER ); - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] ); $linksTables = [ // table name => page_id field 'pagelinks' => 'pl_from',