r96553 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96552‎ | r96553 | r96554 >
Date:11:08, 8 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3/includes/Article.php (modified) (history)
  • /branches/REL1_18/phase3/includes/db/LoadBalancer.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/Article.php
@@ -1765,6 +1765,7 @@
17661766 global $wgEnableParserCache, $wgUser;
17671767 $user = is_null( $user ) ? $wgUser : $user;
17681768
 1769+ wfProfileIn( __METHOD__ );
17691770 // Should the parser cache be used?
17701771 $useParserCache = $wgEnableParserCache &&
17711772 $user->getStubThreshold() == 0 &&
@@ -1780,6 +1781,7 @@
17811782 if ( $useParserCache ) {
17821783 $parserOutput = ParserCache::singleton()->get( $this, $this->mPage->getParserOptions() );
17831784 if ( $parserOutput !== false ) {
 1785+ wfProfileOut( __METHOD__ );
17841786 return $parserOutput;
17851787 }
17861788 }
@@ -1790,11 +1792,13 @@
17911793 } else {
17921794 $rev = Revision::newFromTitle( $this->getTitle(), $oldid );
17931795 if ( $rev === null ) {
 1796+ wfProfileOut( __METHOD__ );
17941797 return false;
17951798 }
17961799 $text = $rev->getText();
17971800 }
17981801
 1802+ wfProfileOut( __METHOD__ );
17991803 return $this->getOutputFromWikitext( $text, $useParserCache );
18001804 }
18011805
Index: branches/REL1_18/phase3/includes/db/LoadBalancer.php
@@ -707,7 +707,7 @@
708708
709709 if ( !is_object( $conn ) ) {
710710 // No last connection, probably due to all servers being too busy
711 - wfLogDBError( "LB failure with no last connection\n" );
 711+ wfLogDBError( "LB failure with no last connection. Connection error: {$this->mLastError}\n" );
712712 $conn = new Database;
713713 // If all servers were busy, mLastError will contain something sensible
714714 throw new DBConnectionError( $conn, $this->mLastError );
Property changes on: branches/REL1_18/phase3/includes/db/LoadBalancer.php
___________________________________________________________________
Modified: svn:mergeinfo
715715 Merged /trunk/phase3/includes/db/LoadBalancer.php:r93682-93683,93851

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93682Merge live hack - Extra debugging on connection failuresdemon23:28, 1 August 2011
r93683Add Profiling to trunk from r93681reedy23:28, 1 August 2011
r93851r93683 missed return in line 1890platonides20:23, 3 August 2011

Status & tagging log