r90293 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90292‎ | r90293 | r90294 >
Date:16:42, 17 June 2011
Author:btongminh
Status:ok
Tags:
Comment:
Per comments revert r88904 and remove session_write_close entirely. This will leave async uploads broken until somebody writes a way to interact with the session per comments on r87235.
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -333,7 +333,6 @@
334334 $this->context->getOutput()->output();
335335 // Do any deferred jobs
336336 wfDoUpdates( 'commit' );
337 -
338337 $this->doJobs();
339338 wfProfileOut( __METHOD__ );
340339 }
@@ -357,10 +356,6 @@
358357 $n = intval( $wgJobRunRate );
359358 }
360359
361 - // Close the session so that jobs don't access the current session
362 - $this->shutdownLBFactory();
363 - session_write_close();
364 -
365360 while ( $n-- && false != ( $job = Job::pop() ) ) {
366361 $output = $job->toString() . "\n";
367362 $t = -wfTime();
@@ -382,20 +377,11 @@
383378 public function restInPeace() {
384379 MessageCache::logMessages();
385380 wfLogProfilingData();
386 - $this->shutdownLBFactory();
387 - wfDebug( "Request ended normally\n" );
388 - }
389 -
390 - /**
391 - * Commit pending master changes, shutdown the current loadbalancer
392 - * factory and destroys the factory instance.
393 - */
394 - private function shutdownLBFactory() {
395381 // Commit and close up!
396 - $factory = LBFactory::singleton();
 382+ $factory = wfGetLBFactory();
397383 $factory->commitMasterChanges();
398384 $factory->shutdown();
399 - LBFactory::destroyInstance();
 385+ wfDebug( "Request ended normally\n" );
400386 }
401387
402388 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87235Remove the session_write_close() from r72475 since it apparently causes bug 2...tstarling04:21, 2 May 2011
r88904(bug 27891) Follow-up r72475: destroy the LBFactory singleton before doing an...btongminh17:11, 26 May 2011

Status & tagging log