Change-Id: Ibaa4745c18c6f4f66edb4c5f190196b575d3b738
if ( $this->usesMainDB() ) {
$lb = $this->getSeparateMainLB()
?: MediaWikiServices::getInstance()->getDBLoadBalancer();
if ( $this->usesMainDB() ) {
$lb = $this->getSeparateMainLB()
?: MediaWikiServices::getInstance()->getDBLoadBalancer();
+ // Return if there are no slaves
+ if ( $lb->getServerCount() <= 1 ) {
+ return true;
+ }
// Main LB is used; wait for any slaves to catch up
try {
$pos = $lb->getMasterPos();
// Main LB is used; wait for any slaves to catch up
try {
$pos = $lb->getMasterPos();