This is more robust and handles old root namespaced DBMasterPos values
Bug: T158127
Change-Id: Iba775fc808ac3e73d360f1adbe45ad222351c2d9
$this->initPositions();
$masterName = $lb->getServerName( $lb->getWriterIndex() );
- if ( !empty( $this->startupPositions[$masterName] ) ) {
+ if (
+ isset( $this->startupPositions[$masterName] ) &&
+ $this->startupPositions[$masterName] instanceof DBMasterPos
+ ) {
$pos = $this->startupPositions[$masterName];
$this->logger->info( __METHOD__ . ": LB for '$masterName' set to pos $pos\n" );
$lb->waitFor( $pos );