X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadbalancer%2FILoadBalancer.php;h=cbd0ff3401b7f1a7bb57d26c1c2f61a7f158bfd6;hp=4c277ff690098954c7500f0fc22952a1912dd0c2;hb=dc17c8ddbf2a51d0061698d1cde9f17136ff0444;hpb=17eda64357834fa847126d8d7f49f6f5b42c4d89 diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index 4c277ff690..cbd0ff3401 100644 --- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php @@ -23,10 +23,6 @@ */ namespace Wikimedia\Rdbms; -use IDatabase; -use Database; -use DBConnRef; -use MaintainableDBConnRef; use DBError; use DBAccessError; use DBTransactionError; @@ -105,6 +101,7 @@ interface ILoadBalancer { * - srvCache : BagOStuff object for server cache [optional] * - memCache : BagOStuff object for cluster memory cache [optional] * - wanCache : WANObjectCache object [optional] + * - chronologyProtector: ChronologyProtector object [optional] * - hostname : The name of the current server [optional] * - cliMode: Whether the execution context is a CLI script. [optional] * - profiler : Class name or instance with profileIn()/profileOut() methods. [optional] @@ -138,7 +135,11 @@ interface ILoadBalancer { * If a DB_REPLICA connection has been opened already, then wait immediately. * Otherwise sets a variable telling it to wait if such a connection is opened. * - * @param DBMasterPos $pos + * This only applies to connections to the generic replica DB for this request. + * If a timeout happens when waiting, then getLaggedReplicaMode()/laggedReplicaUsed() + * will return true. + * + * @param DBMasterPos|bool $pos Master position or false */ public function waitFor( $pos ); @@ -147,7 +148,7 @@ interface ILoadBalancer { * * This can be used a faster proxy for waitForAll() * - * @param DBMasterPos $pos + * @param DBMasterPos|bool $pos Master position or false * @param int $timeout Max seconds to wait; default is mWaitTimeout * @return bool Success (able to connect and no timeouts reached) */ @@ -156,7 +157,7 @@ interface ILoadBalancer { /** * Set the master wait position and wait for ALL replica DBs to catch up to it * - * @param DBMasterPos $pos + * @param DBMasterPos|bool $pos Master position or false * @param int $timeout Max seconds to wait; default is mWaitTimeout * @return bool Success (able to connect and no timeouts reached) */