r97148 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97147‎ | r97148 | r97149 >
Date:12:42, 15 September 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/maintenance/updateCollation.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updateCollation.php
@@ -51,19 +51,6 @@
5252 'collation, though, so it may miss out-of-date rows with a different, ' .
5353 'even older collation.', false, true );
5454 }
55 -
56 - public function syncDBs() {
57 - // TODO: Most of this is duplicated from wfWaitForSlaves(), except for the waitTimeout() call
58 - $lb = wfGetLB();
59 - $lb->waitTimeout(100000);
60 - // bug 27975 - Don't try to wait for slaves if there are none
61 - // Prevents permission error when getting master position
62 - if ( $lb->getServerCount() > 1 ) {
63 - $dbw = $lb->getConnection( DB_MASTER );
64 - $pos = $dbw->getMasterPos();
65 - $lb->waitForAll( $pos );
66 - }
67 - }
6855
6956 public function execute() {
7057 global $wgCategoryCollation, $wgMiserMode;
@@ -171,7 +158,7 @@
172159
173160 if ( ++$batchCount % self::SYNC_INTERVAL == 0 ) {
174161 $this->output( "Waiting for slaves ... " );
175 - $this->syncDBs();
 162+ wfWaitForSlaves();
176163 $this->output( "done\n" );
177164 }
178165 } while ( $res->numRows() == self::BATCH_SIZE );

Follow-up revisions

RevisionCommit summaryAuthorDate
r97173Merged revisions 97087,97091-97092,97094,97096-97098,97100-97101,97103,97136,...dantman16:19, 15 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97146Merge live hacks from r83992 to trunk, after cleaning some things up....catrope12:17, 15 September 2011

Comments

#Comment by Catrope (talk | contribs)   12:43, 15 September 2011

Addendum: because removing waitTimeout() makes syncDBs() identical to wfWaitForSlaves(), I dropped it and updated the caller.

Status & tagging log