Be consistent with other paths of code that supply the external domain
id to LoadBalancer instead of defaulting to the wiki's domain.
This was causing the getReadOnlyReason to fail because it tries to
connect to the local wiki database using external storage credentials.
Bug: T200471
Change-Id: Ie73ea931d5c93f967624ee67717f87c2d9a31559
}
public function isReadOnly( $location ) {
- return ( $this->getLoadBalancer( $location )->getReadOnlyReason() !== false );
+ $lb = $this->getLoadBalancer( $location );
+ $domainId = $this->getDomainId( $lb->getServerInfo( $lb->getWriterIndex() ) );
+ return ( $lb->getReadOnlyReason( $domainId ) !== false );
}
/**