From: Aaron Schulz Date: Thu, 20 Jul 2017 02:22:28 +0000 (-0700) Subject: Fix docs for LoadBalancer::openConnection() X-Git-Tag: 1.31.0-rc.0~2653^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=bb54e69831469e137db09f0b239108bc06b0d45e;p=lhc%2Fweb%2Fwiklou.git Fix docs for LoadBalancer::openConnection() Change-Id: Ib05d98cb3670899a688d9882a2dc364f18e1d4bd --- diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index acb4dce5f6..fc50961f46 100644 --- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php @@ -233,12 +233,13 @@ interface ILoadBalancer { /** * Open a connection to the server given by the specified index - * Index must be an actual index into the array. - * If the server is already open, returns it. + * + * The index must be an actual index into the array. If a connection to the server is + * already open and not considered an "in use" foreign connection, this simply returns it. * * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError. * - * @param int $i Server index or DB_MASTER/DB_REPLICA + * @param int $i Server index (does not support DB_MASTER/DB_REPLICA) * @param string|bool $domain Domain ID, or false for the current domain * @return Database|bool Returns false on errors * @throws DBAccessError diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index 0b70010e19..850d59e299 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -41,7 +41,7 @@ use Exception; class LoadBalancer implements ILoadBalancer { /** @var array[] Map of (server index => server config array) */ private $mServers; - /** @var Database[][][] Map of local/foreignUsed/foreignFree => server index => IDatabase array */ + /** @var Database[][][] Map of local/foreignUsed/foreignFree => server index => IDatabase[] */ private $mConns; /** @var float[] Map of (server index => weight) */ private $mLoads;