Index: trunk/phase3/maintenance/updateCollation.php |
— | — | @@ -51,19 +51,6 @@ |
52 | 52 | 'collation, though, so it may miss out-of-date rows with a different, ' . |
53 | 53 | 'even older collation.', false, true ); |
54 | 54 | } |
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 | | - } |
68 | 55 | |
69 | 56 | public function execute() { |
70 | 57 | global $wgCategoryCollation, $wgMiserMode; |
— | — | @@ -171,7 +158,7 @@ |
172 | 159 | |
173 | 160 | if ( ++$batchCount % self::SYNC_INTERVAL == 0 ) { |
174 | 161 | $this->output( "Waiting for slaves ... " ); |
175 | | - $this->syncDBs(); |
| 162 | + wfWaitForSlaves(); |
176 | 163 | $this->output( "done\n" ); |
177 | 164 | } |
178 | 165 | } while ( $res->numRows() == self::BATCH_SIZE ); |