r83874 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83873‎ | r83874 | r83875 >
Date:09:30, 14 March 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
(bug 27975) Fix r83529 (slave catchup in updateCollation.php) to not try to wait for slaves if there are none. Reporter was getting a permission error for getting the master position on a single-server setup
Modified paths:
  • /trunk/phase3/maintenance/updateCollation.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updateCollation.php
@@ -48,9 +48,13 @@
4949
5050 public function syncDBs() {
5151 $lb = wfGetLB();
52 - $dbw = $lb->getConnection( DB_MASTER );
53 - $pos = $dbw->getMasterPos();
54 - $lb->waitForAll( $pos );
 52+ // bug 27975 - Don't try to wait for slaves if there are none
 53+ // Prevents permission error when getting master position
 54+ if ( $lb->getServerCount() > 1 ) {
 55+ $dbw = $lb->getConnection( DB_MASTER );
 56+ $pos = $dbw->getMasterPos();
 57+ $lb->waitForAll( $pos );
 58+ }
5559 }
5660
5761 public function execute() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r865471.17: MFT r82413, r83529, r83545, r83874, r85544, r86065, r86346, r86477catrope20:24, 20 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83529Make updateCollation.php a bit less murderous for WMF databases:...catrope16:47, 8 March 2011

Comments

#Comment by Hashar (talk | contribs)   19:55, 14 March 2011

Verified by user testing on bug 27975

#Comment by Hashar (talk | contribs)   19:56, 14 March 2011

(removing 1.17 tag, does not make sens since the broken revision r83529 did not make it in 1.17)

Status & tagging log