Removed low signal wfDebugLog call in DatabaseBase
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 3 Dec 2014 22:00:16 +0000 (14:00 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 3 Dec 2014 22:09:33 +0000 (14:09 -0800)
Change-Id: I231766b6a1a1651508bb03fa137e6b2b55c55e6a

includes/db/Database.php

index df04b6d..41b70c3 100644 (file)
@@ -1027,27 +1027,11 @@ abstract class DatabaseBase implements IDatabase {
                        $lastError = $this->lastError();
                        $lastErrno = $this->lastErrno();
                        if ( $this->ping() ) {
-                               global $wgRequestTime;
-
                                wfDebug( "Reconnected\n" );
                                $server = $this->getServer();
                                $msg = __METHOD__ . ": lost connection to $server; reconnected";
                                wfDebugLog( 'DBPerformance', "$msg:\n" . wfBacktrace( true ) );
 
-                               $sqlx = $wgDebugDumpSqlLength ? substr( $commentedSql, 0, $wgDebugDumpSqlLength )
-                                       : $commentedSql;
-                               $sqlx = strtr( $sqlx, "\t\n", '  ' );
-                               $elapsed = round( microtime( true ) - $wgRequestTime, 3 );
-                               if ( $elapsed < 300 ) {
-                                       # Not a database error to lose a transaction after a minute or two
-                                       wfLogDBError(
-                                               "Connection lost and reconnected after {$elapsed}s, query: $sqlx",
-                                               $this->getLogContext( array(
-                                                       'method' => __METHOD__,
-                                                       'query' => $sqlx,
-                                               ) )
-                                       );
-                               }
                                if ( $hadTrx ) {
                                        # Leave $ret as false and let an error be reported.
                                        # Callers may catch the exception and continue to use the DB.