r109357 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109356‎ | r109357 | r109358 >
Date:12:10, 18 January 2012
Author:ialex
Status:ok
Tags:
Comment:
Pass some more __METHOD__ to DatabaseBase::begin() and DatabaseBase::commit()
Modified paths:
  • /trunk/phase3/includes/DeferredUpdates.php (modified) (history)
  • /trunk/phase3/includes/SiteStats.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SiteStats.php
@@ -268,9 +268,9 @@
269269 $sql = "UPDATE $site_stats SET $updates";
270270
271271 # Need a separate transaction because this a global lock
272 - $dbw->begin();
 272+ $dbw->begin( __METHOD__ );
273273 $dbw->query( $sql, __METHOD__ );
274 - $dbw->commit();
 274+ $dbw->commit( __METHOD__ );
275275 }
276276 }
277277
Index: trunk/phase3/includes/DeferredUpdates.php
@@ -70,7 +70,7 @@
7171 $update->doUpdate();
7272
7373 if ( $doCommit && $dbw->trxLevel() ) {
74 - $dbw->commit();
 74+ $dbw->commit( __METHOD__ );
7575 }
7676 }
7777
Index: trunk/phase3/includes/db/Database.php
@@ -836,7 +836,7 @@
837837 # is really used by application
838838 $sqlstart = substr( $sql, 0, 10 ); // very much worth it, benchmark certified(tm)
839839 if ( strpos( $sqlstart, "SHOW " ) !== 0 && strpos( $sqlstart, "SET " ) !== 0 )
840 - $this->begin();
 840+ $this->begin( __METHOD__ . " ($fname)" );
841841 }
842842
843843 if ( $this->debug() ) {
@@ -2742,7 +2742,7 @@
27432743 */
27442744 function deadlockLoop() {
27452745
2746 - $this->begin();
 2746+ $this->begin( __METHOD__ );
27472747 $args = func_get_args();
27482748 $function = array_shift( $args );
27492749 $oldIgnore = $this->ignoreErrors( true );
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -912,7 +912,7 @@
913913 }
914914 foreach ( $conns2[$masterIndex] as $conn ) {
915915 if ( $conn->doneWrites() ) {
916 - $conn->commit();
 916+ $conn->commit( __METHOD__ );
917917 }
918918 }
919919 }

Sign-offs

UserFlagDate
Nikerabbitinspected07:38, 19 January 2012

Status & tagging log