X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadbalancer%2FLoadBalancer.php;h=d84ba65e3d09f5b40b5349d80c9a5885e7fb055c;hb=f23ac02f4fcf156767df66a5df2fa407310fe1d2;hp=ff762b42ccd94195ab07734b6d8d21760fbcadd4;hpb=b416e166a3eba1dcfc2e912e37e443981d7f60ef;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index ff762b42cc..d84ba65e3d 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -28,7 +28,6 @@ use BagOStuff; use EmptyBagOStuff; use WANObjectCache; use ArrayUtils; -use UnexpectedValueException; use InvalidArgumentException; use RuntimeException; use Exception; @@ -953,17 +952,6 @@ class LoadBalancer implements ILoadBalancer { } } - // Final sanity check to make sure the right domain is selected - if ( - $conn instanceof IDatabase && - $this->localDomain->getDatabase() !== null && - $conn->getDomainID() !== $this->localDomain->getId() - ) { - throw new UnexpectedValueException( - "Got connection to '{$conn->getDomainID()}', " . - "but expected local domain ('{$this->localDomain}')." ); - } - return $conn; } @@ -1050,13 +1038,8 @@ class LoadBalancer implements ILoadBalancer { } } + // Increment reference count if ( $conn instanceof IDatabase ) { - // Final sanity check to make sure the right domain is selected - if ( $domainInstance->getDatabase() !== null && $conn->getDomainID() !== $domain ) { - throw new UnexpectedValueException( - "Got connection to '{$conn->getDomainID()}', but expected '$domain'." ); - } - // Increment reference count $refCount = $conn->getLBInfo( 'foreignPoolRefCount' ); $conn->setLBInfo( 'foreignPoolRefCount', $refCount + 1 ); }