[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use MediaWikiServices in restInPeace() for load balancer fac...

2016-08-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use MediaWikiServices in restInPeace() for load balancer factory
..


Use MediaWikiServices in restInPeace() for load balancer factory

Change-Id: Icc12100bd3409900c848c72a31417a8c25ae1021
---
M includes/MediaWiki.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index 21857b9..7dac0ec 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -21,6 +21,7 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
@@ -761,8 +762,9 @@
 * @param string $mode Use 'fast' to always skip job running
 */
public function restInPeace( $mode = 'fast' ) {
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
// Assure deferred updates are not in the main transaction
-   wfGetLBFactory()->commitMasterChanges( __METHOD__ );
+   $factory->commitMasterChanges( __METHOD__ );
 
// Loosen DB query expectations since the HTTP client is 
unblocked
$trxProfiler = Profiler::instance()->getTransactionProfiler();
@@ -788,7 +790,6 @@
wfLogProfilingData();
 
// Commit and close up!
-   $factory = wfGetLBFactory();
$factory->commitMasterChanges( __METHOD__ );
$factory->shutdown( LBFactory::SHUTDOWN_NO_CHRONPROT );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/303696
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc12100bd3409900c848c72a31417a8c25ae1021
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use MediaWikiServices in restInPeace() for load balancer fac...

2016-08-08 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/303696

Change subject: Use MediaWikiServices in restInPeace() for load balancer factory
..

Use MediaWikiServices in restInPeace() for load balancer factory

Change-Id: Icc12100bd3409900c848c72a31417a8c25ae1021
---
M includes/MediaWiki.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/303696/1

diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index 21857b9..7dac0ec 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -21,6 +21,7 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
@@ -761,8 +762,9 @@
 * @param string $mode Use 'fast' to always skip job running
 */
public function restInPeace( $mode = 'fast' ) {
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
// Assure deferred updates are not in the main transaction
-   wfGetLBFactory()->commitMasterChanges( __METHOD__ );
+   $factory->commitMasterChanges( __METHOD__ );
 
// Loosen DB query expectations since the HTTP client is 
unblocked
$trxProfiler = Profiler::instance()->getTransactionProfiler();
@@ -788,7 +790,6 @@
wfLogProfilingData();
 
// Commit and close up!
-   $factory = wfGetLBFactory();
$factory->commitMasterChanges( __METHOD__ );
$factory->shutdown( LBFactory::SHUTDOWN_NO_CHRONPROT );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/303696
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc12100bd3409900c848c72a31417a8c25ae1021
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits