From: Roan Kattouw Date: Thu, 15 Sep 2011 12:42:29 +0000 (+0000) Subject: Followup r97146: drop the $lb->waitTimeout() call per Tim. Was used so Tim could... X-Git-Tag: 1.31.0-rc.0~27646 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=a47f2dcb2d660fc53b49e0eec78f13010c180cc6;p=lhc%2Fweb%2Fwiklou.git Followup r97146: drop the $lb->waitTimeout() call per Tim. Was used so Tim could sleep while a schema change was going on, but this is the kind of live hack that doesn't belong in core. --- diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 396d62c968..7e8a7ee009 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -51,19 +51,6 @@ TEXT; 'collation, though, so it may miss out-of-date rows with a different, ' . 'even older collation.', false, true ); } - - public function syncDBs() { - // TODO: Most of this is duplicated from wfWaitForSlaves(), except for the waitTimeout() call - $lb = wfGetLB(); - $lb->waitTimeout(100000); - // bug 27975 - Don't try to wait for slaves if there are none - // Prevents permission error when getting master position - if ( $lb->getServerCount() > 1 ) { - $dbw = $lb->getConnection( DB_MASTER ); - $pos = $dbw->getMasterPos(); - $lb->waitForAll( $pos ); - } - } public function execute() { global $wgCategoryCollation, $wgMiserMode; @@ -171,7 +158,7 @@ TEXT; if ( ++$batchCount % self::SYNC_INTERVAL == 0 ) { $this->output( "Waiting for slaves ... " ); - $this->syncDBs(); + wfWaitForSlaves(); $this->output( "done\n" ); } } while ( $res->numRows() == self::BATCH_SIZE );