r98149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98148‎ | r98149 | r98150 >
Date:17:59, 26 September 2011
Author:asher
Status:ok
Tags:
Comment:
don't wait on slave lag when upgrading secondary dbs
Modified paths:
  • /branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-1.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-1.php
@@ -55,9 +55,11 @@
5656 foreach ( $wikisBySection[$section] as $wiki ) {
5757 $db->selectDB( $wiki );
5858 $this->upgradeWiki( $db );
59 - while ( $db->getLag() > 10 ) {
60 - echo "Waiting for $server to catch up to master.\n";
61 - sleep( 60 );
 59+ if ( !$this->getOption( 'secondary' ) ) {
 60+ while ( $db->getLag() > 10 ) {
 61+ echo "Waiting for $server to catch up to master.\n";
 62+ sleep( 60 );
 63+ }
6264 }
6365 }
6466 }

Status & tagging log