From: Aaron Schulz Date: Mon, 24 Aug 2015 21:46:19 +0000 (-0700) Subject: Fixed usage of ChronologyProtector in MediaWiki X-Git-Tag: 1.31.0-rc.0~10288^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=5781d545452c31eca76721ee495ae186a5c30c9e;p=lhc%2Fweb%2Fwiklou.git Fixed usage of ChronologyProtector in MediaWiki * Placed an LB shutdown() call in dePreOutputCommit() so that the positions are properly included in sessions before session write(). They need to be part of the synchronous updates that happen before the user gets the response, otherwise it defeats the whole point of the system. Bug: T101224 Change-Id: Idf367c2aa9aae432a0c4d7cc697366aa544d77f2 --- diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index f488aa2485..e9946a8f18 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -495,7 +495,13 @@ class MediaWiki { public function doPreOutputCommit() { // Either all DBs should commit or none ignore_user_abort( true ); - wfGetLBFactory()->commitMasterChanges(); + + // Commit all changes and record ChronologyProtector positions + $factory = wfGetLBFactory(); + $factory->commitMasterChanges(); + $factory->shutdown(); + + wfDebug( __METHOD__ . ' completed; all transactions committed' ); } /**