Fix docs for LoadBalancer::openConnection()
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 20 Jul 2017 02:22:28 +0000 (19:22 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 20 Jul 2017 02:33:32 +0000 (19:33 -0700)
Change-Id: Ib05d98cb3670899a688d9882a2dc364f18e1d4bd

includes/libs/rdbms/loadbalancer/ILoadBalancer.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php

index acb4dce..fc50961 100644 (file)
@@ -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
index 0b70010..850d59e 100644 (file)
@@ -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;