$server['replica'] = true;
}
$this->servers[$i] = $server;
- $serverGroupLoads = [ self::GROUP_GENERIC => $server['load'] ];
- $serverGroupLoads += ( $server['groupLoads'] ?? [] );
- foreach ( $serverGroupLoads as $group => $ratio ) {
+ foreach ( ( $server['groupLoads'] ?? [] ) as $group => $ratio ) {
$this->groupLoads[$group][$i] = $ratio;
}
+ $this->groupLoads[self::GROUP_GENERIC][$i] = $server['load'];
}
$localDomain = isset( $params['localDomain'] )
return $this->laggedReplicaMode;
}
- /**
- * @return bool
- * @since 1.27
- * @deprecated Since 1.28; use laggedReplicaUsed()
- */
- public function laggedSlaveUsed() {
- return $this->laggedReplicaUsed();
- }
-
public function getReadOnlyReason( $domain = false, IDatabase $conn = null ) {
if ( $this->readOnlyReason !== false ) {
return $this->readOnlyReason;
$this->indexAliases = $aliases;
}
- /**
- * @param string $prefix
- * @deprecated Since 1.33
- */
- public function setDomainPrefix( $prefix ) {
- $this->setLocalDomainPrefix( $prefix );
- }
-
public function setLocalDomainPrefix( $prefix ) {
// Find connections to explicit foreign domains still marked as in-use...
$domainsInUse = [];