Merge "Avoid 'message' in log context in AuthManager"
[lhc/web/wiklou.git] / includes / libs / rdbms / loadbalancer / ILoadBalancer.php
index 3b2479f..aa7d1b4 100644 (file)
@@ -60,9 +60,9 @@
  *   - Read-only archive clones: set 'is static' in the server configuration maps. This will
  *      treat all such DBs as having 0 lag.
  *   - SQL load balancing proxy: any proxy should handle lag checks on its own, so the 'max lag'
- *     parameter should probably be set to INF in the server configuration maps. This will make
- *     the load balancer ignore whatever it detects as the lag of the logical replica is (which
- *     would probably just randomly bounce around).
+ *      parameter should probably be set to INF in the server configuration maps. This will make
+ *      the load balancer ignore whatever it detects as the lag of the logical replica is (which
+ *      would probably just randomly bounce around).
  *
  * If using a SQL proxy service, it would probably be best to have two proxy hosts for the
  * load balancer to talk to. One would be the 'host' of the master server entry and another for
  * @ingroup Database
  */
 interface ILoadBalancer {
+       /** @var integer Request a replica DB connection */
+       const DB_REPLICA = -1;
+       /** @var integer Request a master DB connection */
+       const DB_MASTER = -2;
+
        /**
         * Construct a manager of IDatabase connection objects
         *
@@ -211,6 +216,7 @@ interface ILoadBalancer {
         * @param int $i Server index
         * @param string|bool $domain Domain ID, or false for the current domain
         * @return IDatabase|bool Returns false on errors
+        * @throws DBAccessError
         */
        public function openConnection( $i, $domain = false );