X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadbalancer%2FILoadBalancer.php;h=e5ed2f1e840ef34948729b5fae327d0ce72ed113;hb=4154c688e898360fa2f024da5452d29db1241848;hp=3b2479f1ebe7a38120db403d855f7df1229e143a;hpb=09110719680d7a0646a454ff1b2633a042952003;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index 3b2479f1eb..e5ed2f1e84 100644 --- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php @@ -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 @@ -73,6 +73,11 @@ * @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 ); @@ -511,13 +517,6 @@ interface ILoadBalancer { */ public function safeWaitForMasterPos( IDatabase $conn, $pos = false, $timeout = null ); - /** - * Clear the cache for slag lag delay times - * - * This is only used for testing - */ - public function clearLagTimeCache(); - /** * Set a callback via IDatabase::setTransactionListener() on * all current and future master connections of this load balancer