r95147 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95146‎ | r95147 | r95148 >
Date:15:24, 21 August 2011
Author:reedy
Status:ok
Tags:
Comment:
Add in \n from/to r95055 to LoadBalancer.php

Differentiate error messages from r95050 per Hashar
Modified paths:
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)
  • /trunk/phase3/includes/media/Generic.php (modified) (history)
  • /trunk/phase3/maintenance/deleteBatch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/deleteBatch.php
@@ -81,7 +81,6 @@
8282 continue;
8383 }
8484
85 -
8685 $this->output( $page->getPrefixedText() );
8786 $dbw->begin();
8887 if ( $page->getNamespace() == NS_FILE ) {
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -241,7 +241,7 @@
242242 $i = $this->getRandomNonLagged( $currentLoads, $wiki );
243243 if ( $i === false && count( $currentLoads ) != 0 ) {
244244 # All slaves lagged. Switch to read-only mode
245 - wfDebugLog( 'replication', 'All slaves lagged. Switch to read-only mode' );
 245+ wfDebugLog( 'replication', "All slaves lagged. Switch to read-only mode\n" );
246246 $wgReadOnly = wfMessage( 'readonly_lag' )->useDatabase( false )->plain();
247247 $i = $this->pickRandom( $currentLoads );
248248 $laggedSlaveMode = true;
Index: trunk/phase3/includes/media/Generic.php
@@ -495,9 +495,16 @@
496496 $thumbstat = stat( $dstPath );
497497 if( $thumbstat['size'] == 0 || $retval != 0 ) {
498498 $result = unlink( $dstPath );
499 - wfDebugLog( 'thumbnail',
500 - sprintf( 'Removing bad %d-byte thumbnail "%s". unlink() result: %d',
501 - $thumbstat['size'], $dstPath, $result ) );
 499+
 500+ if ( $result ) {
 501+ wfDebugLog( 'thumbnail',
 502+ sprintf( 'Removing bad %d-byte thumbnail "%s". unlink() succeeded',
 503+ $thumbstat['size'], $dstPath ) );
 504+ } else {
 505+ wfDebugLog( 'thumbnail',
 506+ sprintf( 'Removing bad %d-byte thumbnail "%s". unlink() failed',
 507+ $thumbstat['size'], $dstPath ) );
 508+ }
502509 return true;
503510 }
504511 }

Sign-offs

UserFlagDate
Hasharinspected21:04, 21 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95050Incorporate Wikia diff, don't duplicate debugging though, add the info to the...reedy23:06, 19 August 2011
r95055Upstream wikia changesreedy23:19, 19 August 2011

Status & tagging log