r49684 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49683‎ | r49684 | r49685 >
Date:01:51, 21 April 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Made DB profiling work by actually committing it to the DB
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -335,14 +335,16 @@
336336 }
337337
338338 /**
339 - * Cleaning up by doing deferred updates, calling LBFactory and doing the output
 339+ * Cleaning up request by doing:
 340+ ** deferred updates, DB transaction, and the output
340341 *
341342 * @param $deferredUpdates array of updates to do
342343 * @param $output OutputPage
343344 */
344345 function finalCleanup( &$deferredUpdates, &$output ) {
345346 wfProfileIn( __METHOD__ );
346 - # Now commit any transactions, so that unreported errors after output() don't roll back the whole thing
 347+ # Now commit any transactions, so that unreported errors after
 348+ # output() don't roll back the whole DB transaction
347349 $factory = wfGetLBFactory();
348350 $factory->commitMasterChanges();
349351 # Output everything!
@@ -350,8 +352,6 @@
351353 # Do any deferred jobs
352354 $this->doUpdates( $deferredUpdates );
353355 $this->doJobs();
354 - # Commit and close up!
355 - $factory->shutdown();
356356 wfProfileOut( __METHOD__ );
357357 }
358358
@@ -422,6 +422,10 @@
423423 */
424424 function restInPeace() {
425425 wfLogProfilingData();
 426+ # Commit and close up!
 427+ $factory = wfGetLBFactory();
 428+ $factory->commitMasterChanges();
 429+ $factory->shutdown();
426430 wfDebug( "Request ended normally\n" );
427431 }
428432

Follow-up revisions

RevisionCommit summaryAuthorDate
r51046Reverted r50065, restInPeace does this since r49684.tstarling05:32, 27 May 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   21:39, 28 April 2009

Think this is ok...

Status & tagging log