The flags to the driver use new connections for new LBs since
fda4d46fc4f810. This makes it consistent with what we do for
MySQL already.
This should fix warnings about TransactionProfiler in objectcache,
as well as warnings about "Pending writes" in WANObjectCache.
Bug: T167946
Bug: T154424
Change-Id: I0b0d9a7210b6a3270d32df778fcc4b9918d3dcd1
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();
}
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;
}
}