From: jenkins-bot Date: Fri, 7 Jul 2017 00:04:46 +0000 (+0000) Subject: Merge "objectcache: Use a separate postgres connection in SqlBagOStuff" X-Git-Tag: 1.31.0-rc.0~2778 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=89ba3571215d685acd853b85d25b5e2e39c5d858;hp=438df08478794114e7f40a5b62f09ca9ef21e880 Merge "objectcache: Use a separate postgres connection in SqlBagOStuff" --- diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 6c103017d0..70795eccd9 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -148,7 +148,7 @@ class SqlBagOStuff extends BagOStuff { protected function getSeparateMainLB() { global $wgDBtype; - if ( $wgDBtype === 'mysql' && $this->usesMainDB() ) { + if ( $this->usesMainDB() && $wgDBtype !== 'sqlite' ) { if ( !$this->separateMainLB ) { // We must keep a separate connection to MySQL in order to avoid deadlocks $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); @@ -156,8 +156,7 @@ class SqlBagOStuff extends BagOStuff { } return $this->separateMainLB; } else { - // However, SQLite has an opposite behavior. And PostgreSQL needs to know - // if we are in transaction or not (@TODO: find some PostgreSQL work-around). + // However, SQLite has an opposite behavior due to DB-level locking return null; } }