r113195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113194‎ | r113195 | r113196 >
Date:22:59, 6 March 2012
Author:aaron
Status:ok
Tags:
Comment:
Fixed FileOp::attemptBatch() behavior when unexpected failures occur with the 'force' option. It can't continue on since the ops assumed that $predicates was correct, which it won't be. It now simply halts operations.
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/FileOp.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/FileOp.php
@@ -134,13 +134,12 @@
135135 } else {
136136 $status->success[$index] = false;
137137 ++$status->failCount;
138 - if ( !$ignoreErrors ) {
139 - // Log remaining ops as failed for recovery...
140 - for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
141 - $performOps[$i]->logFailure( 'attempt_aborted' );
142 - }
143 - return $status; // bail out
 138+ // We can't continue (even with $ignoreErrors) as $predicates is wrong.
 139+ // Log the remaining ops as failed for recovery...
 140+ for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
 141+ $performOps[$i]->logFailure( 'attempt_aborted' );
144142 }
 143+ return $status; // bail out
145144 }
146145 }
147146

Follow-up revisions

RevisionCommit summaryAuthorDate
r113235MFT r113171, r113195, r113211reedy15:14, 7 March 2012
r113414MFT r113195aaron22:37, 8 March 2012

Status & tagging log