r109438 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109437‎ | r109438 | r109439 >
Date:21:27, 18 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Add __METHOD__ to begin/commit

Improve error message from r109433
Modified paths:
  • /trunk/phase3/includes/upload/UploadStash.php (modified) (history)
  • /trunk/phase3/maintenance/cleanupUploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/cleanupUploadStash.php
@@ -73,7 +73,7 @@
7474 $stash->getFile( $key, true );
7575 $stash->removeFileNoAuth( $key );
7676 } catch ( UploadStashBadPathException $ex ) {
77 - $this->output( 'Failed removing stashed upload with key:' . $key );
 77+ $this->output( "Failed removing stashed upload with key: $key\n" );
7878 continue;
7979 }
8080 }
Index: trunk/phase3/includes/upload/UploadStash.php
@@ -331,13 +331,13 @@
332332 $dbw = $this->repo->getMasterDb();
333333
334334 // this gets its own transaction since it's called serially by the cleanupUploadStash maintenance script
335 - $dbw->begin();
 335+ $dbw->begin( __METHOD__ );
336336 $dbw->delete(
337337 'uploadstash',
338338 array( 'us_key' => $key ),
339339 __METHOD__
340340 );
341 - $dbw->commit();
 341+ $dbw->commit( __METHOD__ );
342342
343343 // TODO: look into UnregisteredLocalFile and find out why the rv here is sometimes wrong (false when file was removed)
344344 // for now, ignore.

Sign-offs

UserFlagDate
Nikerabbitinspected09:07, 19 January 2012

Follow-up revisions

RevisionCommit summaryAuthorDate
r109466Merge r109438reedy01:16, 19 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109433Just experienced with commons. Dealt with UploadStashBadPathException...reedy21:20, 18 January 2012

Status & tagging log