r112625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112624‎ | r112625 | r112626 >
Date:18:41, 28 February 2012
Author:ialex
Status:ok
Tags:
Comment:
Pass __METHOD__ to DatabaseBase::commit() and DatabaseBase::rollback()
Modified paths:
  • /trunk/phase3/maintenance/cleanupImages.php (modified) (history)
  • /trunk/phase3/maintenance/deleteSelfExternals.php (modified) (history)
  • /trunk/phase3/maintenance/fixSlaveDesync.php (modified) (history)
  • /trunk/phase3/maintenance/nukePage.php (modified) (history)
  • /trunk/phase3/maintenance/updateSpecialPages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/deleteSelfExternals.php
@@ -40,7 +40,7 @@
4141 $db = wfGetDB( DB_MASTER );
4242 while ( 1 ) {
4343 wfWaitForSlaves();
44 - $db->commit();
 44+ $db->commit( __METHOD__ );
4545 $q = $db->limitResult( "DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to"
4646 . $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
4747 $this->output( "Deleting a batch\n" );
Index: trunk/phase3/maintenance/nukePage.php
@@ -73,7 +73,7 @@
7474 $this->output( "done.\n" );
7575 }
7676
77 - $dbw->commit();
 77+ $dbw->commit( __METHOD__ );
7878
7979 # Delete revisions as appropriate
8080 if ( $delete && $count ) {
Index: trunk/phase3/maintenance/updateSpecialPages.php
@@ -128,7 +128,7 @@
129129 $this->output( "Reconnected\n\n" );
130130 } else {
131131 # Commit the results
132 - $dbw->commit();
 132+ $dbw->commit( __METHOD__ );
133133 }
134134 # Wait for the slave to catch up
135135 wfWaitForSlaves();
Index: trunk/phase3/maintenance/cleanupImages.php
@@ -173,7 +173,7 @@
174174 if ( !file_exists( $dir ) ) {
175175 if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
176176 $this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
177 - $db->rollback();
 177+ $db->rollback( __METHOD__ );
178178 return;
179179 }
180180 }
Index: trunk/phase3/maintenance/fixSlaveDesync.php
@@ -98,7 +98,7 @@
9999 /*
100100 if ( !$db->masterPosWait( $masterFile, $masterPos, 10 ) ) {
101101 $this->output( "Slave is too lagged, aborting\n" );
102 - $dbw->commit();
 102+ $dbw->commit( __METHOD__ );
103103 sleep(10);
104104 return;
105105 }*/

Status & tagging log