MediaWiki  master
Wikimedia\Rdbms\ILoadBalancer Interface Reference

Database cluster connection, tracking, load balancing, and transaction manager interface. More...

Inheritance diagram for Wikimedia\Rdbms\ILoadBalancer:

Public Member Functions

 __construct (array $params)
 Construct a manager of IDatabase connection objects. More...
 
 allowLagged ( $mode=null)
 Disables/enables lag checks. More...
 
 approveMasterChanges (array $options, $fname=__METHOD__, $owner=null)
 Perform all pre-commit checks for things like replication safety. More...
 
 beginMasterChanges ( $fname=__METHOD__, $owner=null)
 Flush any primary transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set) More...
 
 closeAll ( $fname=__METHOD__, $owner=null)
 Close all open connections. More...
 
 closeConnection (IDatabase $conn)
 Close a connection. More...
 
 commitAll ( $fname=__METHOD__, $owner=null)
 Commit transactions on all open connections. More...
 
 commitMasterChanges ( $fname=__METHOD__, $owner=null)
 Issue COMMIT on all open primary connections to flush changes and view snapshots. More...
 
 disable ( $fname=__METHOD__, $owner=null)
 Close all connections and disable this load balancer. More...
 
 finalizeMasterChanges ( $fname=__METHOD__, $owner=null)
 Run pre-commit callbacks and defer execution of post-commit callbacks. More...
 
 flushMasterSnapshots ( $fname=__METHOD__, $owner=null)
 Commit all primary DB transactions so as to flush any REPEATABLE-READ or SSI snapshots. More...
 
 flushReplicaSnapshots ( $fname=__METHOD__, $owner=null)
 Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshots. More...
 
 forEachOpenConnection ( $callback, array $params=[])
 Call a function with each open connection object. More...
 
 forEachOpenMasterConnection ( $callback, array $params=[])
 Call a function with each open connection object to a primary. More...
 
 forEachOpenReplicaConnection ( $callback, array $params=[])
 Call a function with each open replica DB connection object. More...
 
 getAnyOpenConnection ( $i, $flags=0)
 Get an existing live handle to the given server index (on any domain) More...
 
 getClusterName ()
 Get the logical name of the database cluster. More...
 
 getConnection ( $i, $groups=[], $domain=false, $flags=0)
 Get a live handle for a specific or virtual (DB_PRIMARY/DB_REPLICA) server index. More...
 
 getConnectionRef ( $i, $groups=[], $domain=false, $flags=0)
 Get a live database handle reference for a server index. More...
 
 getLaggedReplicaMode ( $domain=false)
 
 getLagTimes ( $domain=false)
 Get an estimate of replication lag (in seconds) for each server. More...
 
 getLazyConnectionRef ( $i, $groups=[], $domain=false, $flags=0)
 Get a lazy-connecting database handle reference for a server index. More...
 
 getLocalDomainID ()
 Get the local (and default) database domain ID of connection handles. More...
 
 getMaintenanceConnectionRef ( $i, $groups=[], $domain=false, $flags=0)
 Get a live database handle, suitable for migrations and schema changes, for a server index. More...
 
 getMasterPos ()
 Get the current primary replication position. More...
 
 getMaxLag ( $domain=false)
 Get the name and lag time of the most-lagged replica server. More...
 
 getReaderIndex ( $group=false, $domain=false)
 Get the specific server index of the reader connection for a given group. More...
 
 getReadOnlyReason ( $domain=false)
 
 getReplicaResumePos ()
 Get the highest DB replication position for chronology control purposes. More...
 
 getServerAttributes ( $i)
 Get basic attributes of the server with the specified index without connecting. More...
 
 getServerConnection ( $i, $domain, $flags=0)
 Get a live handle for a specific server index. More...
 
 getServerCount ()
 Get the number of servers defined in configuration. More...
 
 getServerInfo ( $i)
 Return the server configuration map for the server with the specified index. More...
 
 getServerName ( $i)
 Get the readable name of the server with the specified index. More...
 
 getServerType ( $i)
 Get the RDBMS type of the server with the specified index (e.g. More...
 
 getWriterIndex ()
 Get the specific server index of the primary server. More...
 
 hasMasterChanges ()
 Whether there are pending changes or callbacks in a transaction by this thread. More...
 
 hasMasterConnection ()
 
 hasOrMadeRecentMasterChanges ( $age=null)
 Check if this load balancer object had any recent or still pending writes issued against it by this PHP thread. More...
 
 hasReplicaServers ()
 Whether there are any replica servers configured. More...
 
 hasStreamingReplicaServers ()
 Whether any replica servers use streaming replication from the primary server. More...
 
 laggedReplicaUsed ()
 Checks whether the database for generic connections this request was both: More...
 
 lastMasterChangeTimestamp ()
 Get the timestamp of the latest write query done by this thread. More...
 
 pendingMasterChangeCallers ()
 Get the list of callers that have pending primary changes. More...
 
 pingAll ()
 
 redefineLocalDomain ( $domain)
 Close all connection and redefine the local domain for testing or schema creation. More...
 
 resolveDomainID ( $domain)
 
 reuseConnection (IDatabase $conn)
 Mark a live handle as being available for reuse under a different database domain. More...
 
 rollbackMasterChanges ( $fname=__METHOD__, $owner=null)
 Issue ROLLBACK only on primary, only if queries were done on connection. More...
 
 runMasterTransactionIdleCallbacks ( $fname=__METHOD__, $owner=null)
 Consume and run all pending post-COMMIT/ROLLBACK callbacks and commit dangling transactions. More...
 
 runMasterTransactionListenerCallbacks ( $fname=__METHOD__, $owner=null)
 Run all recurring post-COMMIT/ROLLBACK listener callbacks. More...
 
 setDomainAliases (array $aliases)
 Convert certain database domains to alternative ones. More...
 
 setIndexAliases (array $aliases)
 Convert certain index names to alternative names before querying the DB. More...
 
 setLocalDomainPrefix ( $prefix)
 Set a new table prefix for the existing local domain ID for testing. More...
 
 setTableAliases (array $aliases)
 Make certain table names use their own database, schema, and table prefix when passed into SQL queries pre-escaped and without a qualified database name. More...
 
 setTempTablesOnlyMode ( $value, $domain)
 Indicate whether the tables on this domain are only temporary tables for testing. More...
 
 setTransactionListener ( $name, callable $callback=null)
 Set a callback via IDatabase::setTransactionListener() on all current and future primary connections of this load balancer. More...
 
 waitFor ( $pos)
 Set the primary position to reach before the next generic group DB handle query. More...
 
 waitForAll ( $pos, $timeout=null)
 Set the primary wait position and wait for ALL replica DBs to catch up to it. More...
 
 waitForMasterPos (IDatabase $conn, $pos=false, $timeout=10)
 Wait for a replica DB to reach a specified primary position. More...
 
 waitForOne ( $pos, $timeout=null)
 Set the primary wait position and wait for a generic replica DB to catch up to it. More...
 

Public Attributes

const CONN_INTENT_WRITABLE = 4
 Caller is requesting the primary DB server for possibly writes. More...
 
const CONN_REFRESH_READ_ONLY = 8
 Bypass and update any server-side read-only mode state cache. More...
 
const CONN_SILENCE_ERRORS = 2
 Return null on connection failure instead of throwing an exception. More...
 
const CONN_TRX_AUTOCOMMIT = 1
 DB handle should have DBO_TRX disabled and the caller will leave it as such. More...
 
const DB_MASTER = self::DB_PRIMARY
 Request a primary, write-enabled DB connection. More...
 
const DB_PRIMARY = -2
 Request a primary, write-enabled DB connection. More...
 
const DB_REPLICA = -1
 Request a replica DB connection. More...
 
const DOMAIN_ANY = ''
 Domain specifier when no specific database needs to be selected. More...
 
const GROUP_GENERIC = ''
 The generic query group. More...
 
const STAGE_POSTCOMMIT_CALLBACKS = 'stage-postcommit-callbacks'
 Manager of ILoadBalancer instances is running post-commit callbacks. More...
 
const STAGE_POSTROLLBACK_CALLBACKS = 'stage-postrollback-callbacks'
 Manager of ILoadBalancer instances is running post-rollback callbacks. More...
 

Detailed Description

Database cluster connection, tracking, load balancing, and transaction manager interface.

A "cluster" is considered to be one primary database and zero or more replica databases. Typically, the replica DBs replicate from the primary asynchronously. The first node in the "servers" configuration array is always considered the "primary". However, this class can still be used when all or some of the "replica" DBs are multi-primary peers of the primary or even when all the DBs are non-replicating clones of each other holding read-only data. Thus, the role of "primary" is in some cases merely nominal.

By default, each DB server uses DBO_DEFAULT for its 'flags' setting, unless explicitly set otherwise in configuration. DBO_DEFAULT behavior depends on whether 'cliMode' is set:

  • In CLI mode, the flag has no effect with regards to LoadBalancer.
  • In non-CLI mode, the flag causes implicit transactions to be used; the first query on a database starts a transaction on that database. The transactions are meant to remain pending until either commitMasterChanges() or rollbackMasterChanges() is called. The application must have some point where it calls commitMasterChanges() near the end of the PHP request. Every iteration of beginMasterChanges()/commitMasterChanges() is called a "transaction round". Rounds are useful on the primary DB connections because they make single-DB (and by and large multi-DB) updates in web requests all-or-nothing. Also, transactions on replica DBs are useful when REPEATABLE-READ or SERIALIZABLE isolation is used because all foriegn keys and constraints hold across separate queries in the DB transaction since the data appears within a consistent point-in-time snapshot.

The typical caller will use LoadBalancer::getConnection( DB_* ) to yield a live database connection handle. The choice of which DB server to use is based on pre-defined loads for weighted random selection, adjustments thereof by LoadMonitor, and the amount of replication lag on each DB server. Lag checks might cause problems in certain setups, so they should be tuned in the server configuration maps as follows:

  • Primary + N Replica(s): set 'max lag' to an appropriate threshold for avoiding any database lagged by this much or more. If all DBs are this lagged, then the load balancer considers the cluster to be read-only.
  • Galera Cluster: Seconds_Behind_Master will be 0, so there probably is nothing to tune. Note that lag is still possible depending on how wsrep-sync-wait is set server-side.
  • Read-only archive clones: set 'is static' in the server configuration maps. This will treat all such DBs as having 0 lag.
  • Externally updated dataset 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).

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 primary server entry and another for the (logical) replica server entry. The proxy could map the load balancer's "replica" DB to any number of physical replica DBs.

Since
1.28

Definition at line 81 of file ILoadBalancer.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Rdbms\ILoadBalancer::__construct ( array  $params)

Construct a manager of IDatabase connection objects.

Parameters
array$paramsParameter map with keys:
  • servers : List of server info structures
  • localDomain: A DatabaseDomain or domain ID string
  • loadMonitor : LoadMonitor::__construct() parameters with "class" field. [optional]
  • readOnlyReason : Reason the primary DB is read-only if so [optional]
  • waitTimeout : Maximum time to wait for replicas for consistency [optional]
  • maxLag: Try to avoid DB replicas with lag above this many seconds [optional]
  • srvCache : BagOStuff object for server cache [optional]
  • wanCache : WANObjectCache object [optional]
  • chronologyCallback: Callback to run before the first connection attempt [optional]
  • defaultGroup: Default query group; the generic group if not specified [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]
  • trxProfiler: TransactionProfiler instance [optional]
  • replLogger: PSR-3 logger instance [optional]
  • connLogger: PSR-3 logger instance [optional]
  • queryLogger: PSR-3 logger instance [optional]
  • perfLogger: PSR-3 logger instance [optional]
  • errorLogger : Callback that takes an Exception and logs it [optional]
  • deprecationLogger: Callback to log a deprecation warning [optional]
  • roundStage: STAGE_POSTCOMMIT_* class constant; for internal use [optional]
  • ownerId: integer ID of an LBFactory instance that manages this instance [optional]
  • clusterName: The logical name of the DB cluster [optional]
  • criticalSectionProvider: CriticalSectionProvider instance [optional]
Exceptions
InvalidArgumentException

Implemented in Wikimedia\Rdbms\LoadBalancerSingle, and Wikimedia\Rdbms\LoadBalancer.

Member Function Documentation

◆ allowLagged()

Wikimedia\Rdbms\ILoadBalancer::allowLagged (   $mode = null)

Disables/enables lag checks.

Parameters
null | bool$mode
Returns
bool

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ approveMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::approveMasterChanges ( array  $options,
  $fname = __METHOD__,
  $owner = null 
)

Perform all pre-commit checks for things like replication safety.

Use this only for mutli-database commits

Parameters
array$optionsIncludes:
  • maxWriteDuration : max write query duration time in seconds
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Exceptions
DBTransactionError

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ beginMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::beginMasterChanges (   $fname = __METHOD__,
  $owner = null 
)

Flush any primary transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)

The DBO_TRX setting will be reverted to the default in each of these methods:

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Exceptions
DBExpectedError

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\initLoadBalancer().

◆ closeAll()

Wikimedia\Rdbms\ILoadBalancer::closeAll (   $fname = __METHOD__,
  $owner = null 
)

Close all open connections.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ closeConnection()

Wikimedia\Rdbms\ILoadBalancer::closeConnection ( IDatabase  $conn)

Close a connection.

Using this function makes sure the LoadBalancer knows the connection is closed. If you use $conn->close() directly, the load balancer won't update its state.

Parameters
IDatabase$conn

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ commitAll()

Wikimedia\Rdbms\ILoadBalancer::commitAll (   $fname = __METHOD__,
  $owner = null 
)

Commit transactions on all open connections.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Exceptions
DBExpectedError

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ commitMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::commitMasterChanges (   $fname = __METHOD__,
  $owner = null 
)

Issue COMMIT on all open primary connections to flush changes and view snapshots.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Exceptions
DBExpectedError

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ disable()

Wikimedia\Rdbms\ILoadBalancer::disable (   $fname = __METHOD__,
  $owner = null 
)

Close all connections and disable this load balancer.

Any attempt to open a new connection will result in a DBAccessError.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ finalizeMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::finalizeMasterChanges (   $fname = __METHOD__,
  $owner = null 
)

Run pre-commit callbacks and defer execution of post-commit callbacks.

Use this only for mutli-database commits

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Returns
int Number of pre-commit callbacks run (since 1.32)

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\commitMasterChanges().

◆ flushMasterSnapshots()

Wikimedia\Rdbms\ILoadBalancer::flushMasterSnapshots (   $fname = __METHOD__,
  $owner = null 
)

Commit all primary DB transactions so as to flush any REPEATABLE-READ or SSI snapshots.

An error will be thrown if a connection has pending writes or callbacks

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ flushReplicaSnapshots()

Wikimedia\Rdbms\ILoadBalancer::flushReplicaSnapshots (   $fname = __METHOD__,
  $owner = null 
)

Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshots.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ forEachOpenConnection()

Wikimedia\Rdbms\ILoadBalancer::forEachOpenConnection (   $callback,
array  $params = [] 
)

Call a function with each open connection object.

Parameters
callable$callback
array$params

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ forEachOpenMasterConnection()

Wikimedia\Rdbms\ILoadBalancer::forEachOpenMasterConnection (   $callback,
array  $params = [] 
)

Call a function with each open connection object to a primary.

Parameters
callable$callback
array$params

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ forEachOpenReplicaConnection()

Wikimedia\Rdbms\ILoadBalancer::forEachOpenReplicaConnection (   $callback,
array  $params = [] 
)

Call a function with each open replica DB connection object.

Parameters
callable$callback
array$params

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getAnyOpenConnection()

Wikimedia\Rdbms\ILoadBalancer::getAnyOpenConnection (   $i,
  $flags = 0 
)

Get an existing live handle to the given server index (on any domain)

Use the CONN_TRX_AUTOCOMMIT flag to only look for connections opened with that flag.

Avoid the use of begin()/commit() and startAtomic()/endAtomic() on any handle returned. This method is largely intended for internal by RDBMs callers that issue queries that do not affect any current transaction.

Parameters
int$iSpecific or virtual (DB_PRIMARY/DB_REPLICA) server index
int$flagsBitfield of CONN_* class constants
Returns
Database|bool False if no such connection is open

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getClusterName()

Wikimedia\Rdbms\ILoadBalancer::getClusterName ( )

Get the logical name of the database cluster.

This is useful for identifying a cluster or replicated dataset, even when:

  • The primary server is sometimes swapped with another one
  • The cluster/dataset is replicated among multiple datacenters, with one "primary" datacenter having the writable primary server and the other datacenters having a read-only replica in the "primary" server slot
  • The dataset is replicated among multiple datacenters, via circular replication, with each datacenter having its own "primary" server
Returns
string
Since
1.36

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\ChronologyProtector\applySessionReplicationPosition(), Wikimedia\Rdbms\ChronologyProtector\getTouched(), and Wikimedia\Rdbms\ChronologyProtector\stageSessionReplicationPosition().

◆ getConnection()

Wikimedia\Rdbms\ILoadBalancer::getConnection (   $i,
  $groups = [],
  $domain = false,
  $flags = 0 
)

Get a live handle for a specific or virtual (DB_PRIMARY/DB_REPLICA) server index.

The server index, $i, can be one of the following:

  • DB_REPLICA: a server index will be selected by the load balancer based on read weight, connectivity, and replication lag. Note that the primary server might be configured with read weight. If $groups is empty then it means "the generic group", in which case all servers defined with read weight will be considered. Additional query groups can be configured, having their own list of server indexes and read weights. If a query group list is provided in $groups, then each recognized group will be tried, left-to-right, until server index selection succeeds or all groups have been tried, in which case the generic group will be tried.
  • DB_PRIMARY: the primary server index will be used; the same as getWriterIndex(). The value of $groups should be [] when using this server index.
  • Specific server index: a positive integer can be provided to use the server with that index. An error will be thrown in no such server index is recognized. This server selection method is usually only useful for internal load balancing logic. The value of $groups should be [] when using a specific server index.

Handles acquired by this method, getConnectionRef(), getLazyConnectionRef(), and getMaintenanceConnectionRef() use the same set of shared connection pools. Callers that get a local DB domain handle for the same server will share one handle for all of those callers using CONN_TRX_AUTOCOMMIT (via $flags) and one handle for all of those callers not using CONN_TRX_AUTOCOMMIT. Callers that get a foreign DB domain handle (via $domain) will share any handle that has the right CONN_TRX_AUTOCOMMIT mode and is already on the right DB domain. Otherwise, one of the "free for reuse" handles will be claimed or a new handle will be made if there are none.

Handle sharing is particularly useful when callers get local DB domain (the default), transaction round aware (the default), DB_PRIMARY handles. All such callers will operate within a single database transaction as a consequence. Handle sharing is also useful when callers get local DB domain (the default), transaction round aware (the default), samely query grouped (the default), DB_REPLICA handles. All such callers will operate within a single database transaction as a consequence.

Callers of this function that use a non-local $domain must call reuseConnection() after their last query on this handle executed. This lets the load balancer share the handle with other callers requesting connections on different database domains.

Use CONN_TRX_AUTOCOMMIT to use a separate pool of only auto-commit handles. This flag is ignored for databases with ATTR_DB_LEVEL_LOCKING (e.g. sqlite) in order to avoid deadlocks. getServerAttributes() can be used to check such attributes beforehand. Avoid using IDatabase::begin() and IDatabase::commit() on such handles. If it is not possible to avoid using methods like IDatabase::startAtomic() and IDatabase::endAtomic(), callers should at least make sure that the atomic sections are closed on failure via try/catch and IDatabase::cancelAtomic().

See also
ILoadBalancer::reuseConnection()
ILoadBalancer::getServerAttributes()
Parameters
int$iSpecific (overrides $groups) or virtual (DB_PRIMARY/DB_REPLICA) server index
string[] | string$groupsQuery group(s) in preference order; [] for the default group
string | bool$domainDB domain ID or false for the local domain
int$flagsBitfield of CONN_* class constants
Note
This method throws DBAccessError if ILoadBalancer::disable() was called
Returns
IDatabase|bool This returns false on failure if CONN_SILENCE_ERRORS is set
Exceptions
DBErrorIf no live handle could be obtained and CONN_SILENCE_ERRORS is not set
DBAccessErrorIf disable() was previously called
InvalidArgumentException

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by MergeHistory\__construct().

◆ getConnectionRef()

Wikimedia\Rdbms\ILoadBalancer::getConnectionRef (   $i,
  $groups = [],
  $domain = false,
  $flags = 0 
)

Get a live database handle reference for a server index.

The CONN_TRX_AUTOCOMMIT flag is ignored for databases with ATTR_DB_LEVEL_LOCKING (e.g. sqlite) in order to avoid deadlocks. The getServerAttributes() method can be used to check such flags beforehand. Avoid the use of begin() or startAtomic() on any CONN_TRX_AUTOCOMMIT connections.

See also
ILoadBalancer::getConnection() for parameter information
Parameters
int$iSpecific or virtual (DB_PRIMARY/DB_REPLICA) server index
string[] | string$groupsQuery group(s) in preference order; [] for the default group
string | bool$domainDB domain ID or false for the local domain
int$flagsBitfield of CONN_* class constants (e.g. CONN_TRX_AUTOCOMMIT)
Returns
DBConnRef

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by ProtectedPagesPager\__construct(), ProtectedTitlesPager\__construct(), NewPagesPager\__construct(), BlockListPager\__construct(), UsersPager\__construct(), AllMessagesTablePager\__construct(), ApiTag\__construct(), SpecialDoubleRedirects\__construct(), CategoryPager\__construct(), DeletedContribsPager\__construct(), ImageListPager\__construct(), NewFilesPager\__construct(), SpecialRandomrootpage\__construct(), and MergeHistoryPager\__construct().

◆ getLaggedReplicaMode()

Wikimedia\Rdbms\ILoadBalancer::getLaggedReplicaMode (   $domain = false)
Note
This method will trigger a DB connection if not yet done
Parameters
string | bool$domainDB domain ID or false for the local domain
Returns
bool Whether the database for generic connections this request is highly "lagged"

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getLagTimes()

Wikimedia\Rdbms\ILoadBalancer::getLagTimes (   $domain = false)

Get an estimate of replication lag (in seconds) for each server.

Results are cached for a short time in memcached/process cache

Values may be "false" if replication is too broken to estimate

Parameters
string | bool$domain
Returns
float[]|int[]|false[] Map of (server index => lag) in order of server index

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getLazyConnectionRef()

Wikimedia\Rdbms\ILoadBalancer::getLazyConnectionRef (   $i,
  $groups = [],
  $domain = false,
  $flags = 0 
)

Get a lazy-connecting database handle reference for a server index.

The handle's methods simply proxy to those of an underlying IDatabase handle which takes care of the actual connection and query logic.

The CONN_TRX_AUTOCOMMIT flag is ignored for databases with ATTR_DB_LEVEL_LOCKING (e.g. sqlite) in order to avoid deadlocks. getServerAttributes() can be used to check such flags beforehand. Avoid the use of begin() or startAtomic() on any CONN_TRX_AUTOCOMMIT connections.

See also
ILoadBalancer::getConnection() for parameter information
Parameters
int$iSpecific or virtual (DB_PRIMARY/DB_REPLICA) server index
string[] | string$groupsQuery group(s) in preference order; [] for the default group
string | bool$domainDB domain ID or false for the local domain
int$flagsBitfield of CONN_* class constants
Returns
DBConnRef Live connection handle or null on failure
Exceptions
DBErrorIf no live handle could be obtained
DBAccessErrorIf disable() was previously called

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by SearchDatabase\__construct().

◆ getLocalDomainID()

Wikimedia\Rdbms\ILoadBalancer::getLocalDomainID ( )

Get the local (and default) database domain ID of connection handles.

See also
DatabaseDomain
Returns
string Database domain ID; this specifies DB name, schema, and table prefix
Since
1.31

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getMaintenanceConnectionRef()

Wikimedia\Rdbms\ILoadBalancer::getMaintenanceConnectionRef (   $i,
  $groups = [],
  $domain = false,
  $flags = 0 
)

Get a live database handle, suitable for migrations and schema changes, for a server index.

The handle's methods simply proxy to those of an underlying IDatabase handle which takes care of the actual connection and query logic.

The CONN_TRX_AUTOCOMMIT flag is ignored for databases with ATTR_DB_LEVEL_LOCKING (e.g. sqlite) in order to avoid deadlocks. getServerAttributes() can be used to check such flags beforehand. Avoid the use of begin() or startAtomic() on any CONN_TRX_AUTOCOMMIT connections.

See also
ILoadBalancer::getConnection() for parameter information
Parameters
int$iSpecific or virtual (DB_PRIMARY/DB_REPLICA) server index
string[] | string$groupsQuery group(s) in preference order; [] for the default group
string | bool$domainDB domain ID or false for the local domain
int$flagsBitfield of CONN_* class constants (e.g. CONN_TRX_AUTOCOMMIT)
Returns
MaintainableDBConnRef Live connection handle
Exceptions
DBErrorIf no live handle could be obtained
DBAccessErrorIf disable() was previously called

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getMasterPos()

Wikimedia\Rdbms\ILoadBalancer::getMasterPos ( )

Get the current primary replication position.

Returns
DBMasterPos|bool Returns false if not applicable
Exceptions
DBError

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getMaxLag()

Wikimedia\Rdbms\ILoadBalancer::getMaxLag (   $domain = false)

Get the name and lag time of the most-lagged replica server.

This is useful for maintenance scripts that need to throttle their updates. May attempt to open connections to replica DBs on the default DB. If there is no lag, the maximum lag will be reported as -1.

Parameters
bool | string$domainDomain ID or false for the default database
Returns
array{0:string,1:float|int|false,2:int} (host, max lag, index of max lagged host)

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getReaderIndex()

Wikimedia\Rdbms\ILoadBalancer::getReaderIndex (   $group = false,
  $domain = false 
)

Get the specific server index of the reader connection for a given group.

This takes into account load ratios and lag times. It should return a consistent index during the life time of the load balancer. This initially checks replica DBs for connectivity to avoid returning an unusable server. This means that connections might be attempted by calling this method (usally one at the most but possibly more). Subsequent calls with the same $group will not need to make new connection attempts since the acquired connection for each group is preserved.

Parameters
string | bool$groupQuery group or false for the generic group
string | bool$domainDB domain ID or false for the local domain
Returns
int|bool Specific server index, or false if no live handle can be obtained

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getReadOnlyReason()

Wikimedia\Rdbms\ILoadBalancer::getReadOnlyReason (   $domain = false)
Note
This method may trigger a DB connection if not yet done
Parameters
string | bool$domainDB domain ID or false for the local domain
Returns
string|bool Reason the primary is read-only or false if it is not

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getReplicaResumePos()

Wikimedia\Rdbms\ILoadBalancer::getReplicaResumePos ( )

Get the highest DB replication position for chronology control purposes.

If there is only a primary server then this returns false. If replication is present and correctly configured, then this returns the highest replication position of any server with an open connection. That position can later be passed to waitFor() on a new load balancer instance to make sure that queries on the new connections see data at least as up-to-date as queries (prior to this method call) on the old connections.

This can be useful for implementing session consistency, where the session will be resumed accross multiple HTTP requests or CLI script instances.

Returns
DBMasterPos|bool Replication position or false if not applicable
Since
1.34

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\ChronologyProtector\stageSessionReplicationPosition().

◆ getServerAttributes()

Wikimedia\Rdbms\ILoadBalancer::getServerAttributes (   $i)

Get basic attributes of the server with the specified index without connecting.

Parameters
int$iSpecific server index
Returns
array (Database::ATTRIBUTE_* constant => value) for all such constants
Since
1.31

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getServerConnection()

Wikimedia\Rdbms\ILoadBalancer::getServerConnection (   $i,
  $domain,
  $flags = 0 
)

Get a live handle for a specific server index.

This is a simpler version of getConnection() that does not accept virtual server indexes (e.g. DB_PRIMARY/DB_REPLICA), does not assure that primary DB handles have read-only mode when there is high replication lag, and can only trigger attempts to connect to a single server (the one with the specified server index).

See also
ILoadBalancer::getConnection()
Parameters
int$iSpecific server index
string$domainResolved DB domain
int$flagsBitfield of class CONN_* constants
Returns
IDatabase|false This returns false on failure if CONN_SILENCE_ERRORS is set
Exceptions
DBErrorIf no live handle could be obtained and CONN_SILENCE_ERRORS is not set

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getServerCount()

Wikimedia\Rdbms\ILoadBalancer::getServerCount ( )

Get the number of servers defined in configuration.

Returns
int

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getServerInfo()

Wikimedia\Rdbms\ILoadBalancer::getServerInfo (   $i)

Return the server configuration map for the server with the specified index.

Parameters
int$iSpecific server index
Returns
array|false Server configuration map; false if the index is invalid
Since
1.31

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getServerName()

Wikimedia\Rdbms\ILoadBalancer::getServerName (   $i)

Get the readable name of the server with the specified index.

Parameters
int$iSpecific server index
Returns
string Readable server name, falling back to the hostname or IP address

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\ChronologyProtector\applySessionReplicationPosition(), Wikimedia\Rdbms\LBFactory\logIfMultiDbTransaction(), Wikimedia\Rdbms\LBFactory\shutdownChronologyProtector(), and Wikimedia\Rdbms\ChronologyProtector\stageSessionReplicationPosition().

◆ getServerType()

Wikimedia\Rdbms\ILoadBalancer::getServerType (   $i)

Get the RDBMS type of the server with the specified index (e.g.

"mysql", "sqlite")

Parameters
int$iSpecific server index
Returns
string One of (mysql,postgres,sqlite,...) or "unknown" for bad indexes
Since
1.30

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ getWriterIndex()

◆ hasMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::hasMasterChanges ( )

Whether there are pending changes or callbacks in a transaction by this thread.

Returns
bool

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\hasMasterChanges().

◆ hasMasterConnection()

Wikimedia\Rdbms\ILoadBalancer::hasMasterConnection ( )
Returns
bool Whether a primary connection is already open

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ hasOrMadeRecentMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::hasOrMadeRecentMasterChanges (   $age = null)

Check if this load balancer object had any recent or still pending writes issued against it by this PHP thread.

Parameters
float | null$ageHow many seconds ago is "recent" [defaults to mWaitTimeout]
Returns
bool

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\hasOrMadeRecentMasterChanges(), and Wikimedia\Rdbms\ChronologyProtector\stageSessionReplicationPosition().

◆ hasReplicaServers()

Wikimedia\Rdbms\ILoadBalancer::hasReplicaServers ( )

Whether there are any replica servers configured.

This counts both servers using streaming replication from the primary server and servers that just have a clone of the static dataset found on the primary server

Returns
int
Since
1.34

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ hasStreamingReplicaServers()

Wikimedia\Rdbms\ILoadBalancer::hasStreamingReplicaServers ( )

Whether any replica servers use streaming replication from the primary server.

Generally this is one less than getServerCount(), though it might otherwise return a lower number if some of the servers are configured with "is static". That flag is used when both the server has no active replication setup and the dataset is either read-only or occasionally updated out-of-band. For example, a script might import a new geographic information dataset each week by writing it to each server and later directing the application to use the new version.

It is possible for some replicas to be configured with "is static" but not others, though it generally should either be set for all or none of the replicas.

If this returns zero, this means that there is generally no reason to execute replication wait logic for session consistency and lag reduction.

Returns
int
Since
1.34

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\appendShutdownCPIndexAsQuery(), and Wikimedia\Rdbms\ChronologyProtector\stageSessionReplicationPosition().

◆ laggedReplicaUsed()

Wikimedia\Rdbms\ILoadBalancer::laggedReplicaUsed ( )

Checks whether the database for generic connections this request was both:

  • a) Already choosen due to a prior connection attempt
  • b) Considered highly "lagged"
Note
This method will never cause a new DB connection
Returns
bool

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\laggedReplicaUsed().

◆ lastMasterChangeTimestamp()

Wikimedia\Rdbms\ILoadBalancer::lastMasterChangeTimestamp ( )

Get the timestamp of the latest write query done by this thread.

Returns
float|bool UNIX timestamp or false

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ pendingMasterChangeCallers()

Wikimedia\Rdbms\ILoadBalancer::pendingMasterChangeCallers ( )

Get the list of callers that have pending primary changes.

Returns
string[] List of method names

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\logIfMultiDbTransaction().

◆ pingAll()

Wikimedia\Rdbms\ILoadBalancer::pingAll ( )
Returns
bool

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ redefineLocalDomain()

Wikimedia\Rdbms\ILoadBalancer::redefineLocalDomain (   $domain)

Close all connection and redefine the local domain for testing or schema creation.

Parameters
DatabaseDomain | string$domain
Since
1.33

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\redefineLocalDomain().

◆ resolveDomainID()

Wikimedia\Rdbms\ILoadBalancer::resolveDomainID (   $domain)
Parameters
DatabaseDomain | string | bool$domainDatabase domain
Returns
string Value of $domain if it is foreign or the local domain otherwise
Since
1.32

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ reuseConnection()

Wikimedia\Rdbms\ILoadBalancer::reuseConnection ( IDatabase  $conn)

Mark a live handle as being available for reuse under a different database domain.

This mechanism is reference-counted, and must be called the same number of times as getConnection() to work. Never call this on handles acquired via getConnectionRef(), getLazyConnectionRef(), and getMaintenanceConnectionRef(), as they already manage the logic of calling this method when they fall out of scope in PHP.

See also
ILoadBalancer::getConnection()
Parameters
IDatabase$conn
Exceptions
LogicException

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ rollbackMasterChanges()

Wikimedia\Rdbms\ILoadBalancer::rollbackMasterChanges (   $fname = __METHOD__,
  $owner = null 
)

Issue ROLLBACK only on primary, only if queries were done on connection.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Exceptions
DBExpectedError

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ runMasterTransactionIdleCallbacks()

Wikimedia\Rdbms\ILoadBalancer::runMasterTransactionIdleCallbacks (   $fname = __METHOD__,
  $owner = null 
)

Consume and run all pending post-COMMIT/ROLLBACK callbacks and commit dangling transactions.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Returns
Exception|null The first exception or null if there were none

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\executePostTransactionCallbacks().

◆ runMasterTransactionListenerCallbacks()

Wikimedia\Rdbms\ILoadBalancer::runMasterTransactionListenerCallbacks (   $fname = __METHOD__,
  $owner = null 
)

Run all recurring post-COMMIT/ROLLBACK listener callbacks.

Parameters
string$fnameCaller name
int | null$ownerID of the calling instance (e.g. the LBFactory ID)
Returns
Exception|null The first exception or null if there were none

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\executePostTransactionCallbacks().

◆ setDomainAliases()

Wikimedia\Rdbms\ILoadBalancer::setDomainAliases ( array  $aliases)

Convert certain database domains to alternative ones.

This can be used for backwards compatibility logic.

Parameters
DatabaseDomain[] | string[]$aliasesMap of (domain alias => domain)
Since
1.35

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by CloneDatabase\changePrefix(), and Wikimedia\Rdbms\LBFactory\initLoadBalancer().

◆ setIndexAliases()

Wikimedia\Rdbms\ILoadBalancer::setIndexAliases ( array  $aliases)

Convert certain index names to alternative names before querying the DB.

Note that this applies to indexes regardless of the table they belong to.

This can be employed when an index was renamed X => Y in code, but the new Y-named indexes were not yet built on all DBs. After all the Y-named ones are added by the DBA, the aliases can be removed, and then the old X-named indexes dropped.

Parameters
string[]$aliases
Since
1.31

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\initLoadBalancer().

◆ setLocalDomainPrefix()

Wikimedia\Rdbms\ILoadBalancer::setLocalDomainPrefix (   $prefix)

Set a new table prefix for the existing local domain ID for testing.

Parameters
string$prefix
Since
1.33

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\setLocalDomainPrefix().

◆ setTableAliases()

Wikimedia\Rdbms\ILoadBalancer::setTableAliases ( array  $aliases)

Make certain table names use their own database, schema, and table prefix when passed into SQL queries pre-escaped and without a qualified database name.

For example, "user" can be converted to "myschema.mydbname.user" for convenience. Appearances like user, somedb.user, somedb.someschema.user will used literally.

Calling this twice will completely clear any old table aliases. Also, note that callers are responsible for making sure the schemas and databases actually exist.

Parameters
array[]$aliasesMap of (table => (dbname, schema, prefix) map)

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\initLoadBalancer().

◆ setTempTablesOnlyMode()

Wikimedia\Rdbms\ILoadBalancer::setTempTablesOnlyMode (   $value,
  $domain 
)

Indicate whether the tables on this domain are only temporary tables for testing.

In "temporary tables mode", the ILoadBalancer::CONN_TRX_AUTOCOMMIT flag is ignored

Parameters
bool$value
string$domain
Returns
bool Whether "temporary tables mode" was active
Since
1.34

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ setTransactionListener()

Wikimedia\Rdbms\ILoadBalancer::setTransactionListener (   $name,
callable  $callback = null 
)

Set a callback via IDatabase::setTransactionListener() on all current and future primary connections of this load balancer.

Parameters
string$nameCallback name
callable | null$callback

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ waitFor()

Wikimedia\Rdbms\ILoadBalancer::waitFor (   $pos)

Set the primary position to reach before the next generic group DB handle query.

If a generic replica DB connection is already open then this immediately waits for that DB to catch up to the specified replication position. Otherwise, it will do so once such a connection is opened.

If a timeout happens when waiting, then getLaggedReplicaMode()/laggedReplicaUsed() will return true. This is useful for discouraging clients from taking further actions if session consistency could not be maintained with respect to their last actions.

Parameters
DBMasterPos | bool$posPrimary position or false

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\ChronologyProtector\applySessionReplicationPosition().

◆ waitForAll()

Wikimedia\Rdbms\ILoadBalancer::waitForAll (   $pos,
  $timeout = null 
)

Set the primary wait position and wait for ALL replica DBs to catch up to it.

This method is only intented for use a throttling mechanism for high-volume updates. Unlike waitFor(), failure does not effect getLaggedReplicaMode()/laggedReplicaUsed().

Parameters
DBMasterPos | bool$posPrimary position or false
int | null$timeoutMax seconds to wait; default is mWaitTimeout
Returns
bool Success (able to connect and no timeouts reached)

Implemented in Wikimedia\Rdbms\LoadBalancer.

Referenced by Wikimedia\Rdbms\LBFactory\shutdownChronologyProtector().

◆ waitForMasterPos()

Wikimedia\Rdbms\ILoadBalancer::waitForMasterPos ( IDatabase  $conn,
  $pos = false,
  $timeout = 10 
)

Wait for a replica DB to reach a specified primary position.

If $conn is not a replica server connection, then this will return true. Otherwise, if $pos is not provided, this will connect to the primary server to get an accurate position.

Parameters
IDatabase$connReplica DB
DBMasterPos | bool$posPrimary position; default: current position
int$timeoutTimeout in seconds [optional]
Returns
bool Success
Since
1.34

Implemented in Wikimedia\Rdbms\LoadBalancer.

◆ waitForOne()

Wikimedia\Rdbms\ILoadBalancer::waitForOne (   $pos,
  $timeout = null 
)

Set the primary wait position and wait for a generic replica DB to catch up to it.

This method is only intented for use a throttling mechanism for high-volume updates. Unlike waitFor(), failure does not effect getLaggedReplicaMode()/laggedReplicaUsed().

This can be used a faster proxy for waitForAll()

Parameters
DBMasterPos | bool$posPrimary position or false
int | null$timeoutMax seconds to wait; default is mWaitTimeout
Returns
bool Success (able to connect and no timeouts reached)

Implemented in Wikimedia\Rdbms\LoadBalancer.

Member Data Documentation

◆ CONN_INTENT_WRITABLE

const Wikimedia\Rdbms\ILoadBalancer::CONN_INTENT_WRITABLE = 4

Caller is requesting the primary DB server for possibly writes.

Definition at line 108 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LoadBalancer\sanitizeConnectionFlags().

◆ CONN_REFRESH_READ_ONLY

const Wikimedia\Rdbms\ILoadBalancer::CONN_REFRESH_READ_ONLY = 8

Bypass and update any server-side read-only mode state cache.

Definition at line 110 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LoadBalancer\isMasterRunningReadOnly().

◆ CONN_SILENCE_ERRORS

const Wikimedia\Rdbms\ILoadBalancer::CONN_SILENCE_ERRORS = 2

Return null on connection failure instead of throwing an exception.

Definition at line 106 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LoadMonitor\computeServerStates(), Wikimedia\Rdbms\LoadBalancer\doWait(), and Wikimedia\Rdbms\LoadBalancer\waitForMasterPos().

◆ CONN_TRX_AUTOCOMMIT

◆ DB_MASTER

const Wikimedia\Rdbms\ILoadBalancer::DB_MASTER = self::DB_PRIMARY

Request a primary, write-enabled DB connection.

Deprecated:
since 1.36, Use DB_PRIMARY instead

Definition at line 95 of file ILoadBalancer.php.

◆ DB_PRIMARY

const Wikimedia\Rdbms\ILoadBalancer::DB_PRIMARY = -2

◆ DB_REPLICA

const Wikimedia\Rdbms\ILoadBalancer::DB_REPLICA = -1

Request a replica DB connection.

Definition at line 83 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LoadBalancer\getRoleFromIndex().

◆ DOMAIN_ANY

const Wikimedia\Rdbms\ILoadBalancer::DOMAIN_ANY = ''

Domain specifier when no specific database needs to be selected.

Definition at line 99 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LoadMonitor\computeServerStates().

◆ GROUP_GENERIC

◆ STAGE_POSTCOMMIT_CALLBACKS

const Wikimedia\Rdbms\ILoadBalancer::STAGE_POSTCOMMIT_CALLBACKS = 'stage-postcommit-callbacks'

Manager of ILoadBalancer instances is running post-commit callbacks.

Definition at line 113 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LBFactory\baseLoadBalancerParams().

◆ STAGE_POSTROLLBACK_CALLBACKS

const Wikimedia\Rdbms\ILoadBalancer::STAGE_POSTROLLBACK_CALLBACKS = 'stage-postrollback-callbacks'

Manager of ILoadBalancer instances is running post-rollback callbacks.

Definition at line 115 of file ILoadBalancer.php.

Referenced by Wikimedia\Rdbms\LBFactory\baseLoadBalancerParams().


The documentation for this interface was generated from the following file: