X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadbalancer%2FILoadBalancer.php;h=9f7d0502ae7f063569c0a01137a94649ab75ad65;hb=822a87b5fa5428e15a96ac102005b45f295dc92a;hp=0ff6a32980df9c55450c86282d3d82a868a132ec;hpb=32fd2342e5648ec7d37eecb00fc4044a3a7526a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index 0ff6a32980..9f7d0502ae 100644 --- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php @@ -187,7 +187,8 @@ interface ILoadBalancer { /** * Get any open connection to a given server index, local or foreign * - * Use CONN_TRX_AUTOCOMMIT to only look for connections opened with that flag + * Use CONN_TRX_AUTOCOMMIT to only look for connections opened with that flag. + * Avoid the use of begin() or startAtomic() on any such connections. * * @param int $i Server index or DB_MASTER/DB_REPLICA * @param int $flags Bitfield of CONN_* class constants @@ -202,9 +203,10 @@ interface ILoadBalancer { * (e.g. sqlite) in order to avoid deadlocks. ILoadBalancer::getServerAttributes() * can be used to check such flags beforehand. * - * If the caller uses $domain or sets CONN_TRX_AUTOCOMMIT in $flags, then it must also - * call ILoadBalancer::reuseConnection() on the handle when finished using it. + * If the caller uses $domain or sets CONN_TRX_AUTOCOMMIT in $flags, then it must + * also call ILoadBalancer::reuseConnection() on the handle when finished using it. * In all other cases, this is not necessary, though not harmful either. + * Avoid the use of begin() or startAtomic() on any such connections. * * @param int $i Server index (overrides $groups) or DB_MASTER/DB_REPLICA * @param array|string|bool $groups Query group(s), or false for the generic reader @@ -236,7 +238,8 @@ interface ILoadBalancer { * * The CONN_TRX_AUTOCOMMIT flag is ignored for databases with ATTR_DB_LEVEL_LOCKING * (e.g. sqlite) in order to avoid deadlocks. ILoadBalancer::getServerAttributes() - * can be used to check such flags beforehand. + * can be used to check such flags beforehand. Avoid the use of begin() or startAtomic() + * on any CONN_TRX_AUTOCOMMIT connections. * * @see ILoadBalancer::getConnection() for parameter information * @@ -255,7 +258,8 @@ interface ILoadBalancer { * * The CONN_TRX_AUTOCOMMIT flag is ignored for databases with ATTR_DB_LEVEL_LOCKING * (e.g. sqlite) in order to avoid deadlocks. ILoadBalancer::getServerAttributes() - * can be used to check such flags beforehand. + * can be used to check such flags beforehand. Avoid the use of begin() or startAtomic() + * on any CONN_TRX_AUTOCOMMIT connections. * * @see ILoadBalancer::getConnection() for parameter information * @@ -274,7 +278,8 @@ interface ILoadBalancer { * * The CONN_TRX_AUTOCOMMIT flag is ignored for databases with ATTR_DB_LEVEL_LOCKING * (e.g. sqlite) in order to avoid deadlocks. ILoadBalancer::getServerAttributes() - * can be used to check such flags beforehand. + * can be used to check such flags beforehand. Avoid the use of begin() or startAtomic() + * on any CONN_TRX_AUTOCOMMIT connections. * * @see ILoadBalancer::getConnection() for parameter information * @@ -292,13 +297,14 @@ interface ILoadBalancer { * 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. * - * Avoid using CONN_TRX_AUTOCOMMIT for databases with ATTR_DB_LEVEL_LOCKING (e.g. sqlite) in - * order to avoid deadlocks. ILoadBalancer::getServerAttributes() can be used to check + * Avoid using CONN_TRX_AUTOCOMMIT for databases with ATTR_DB_LEVEL_LOCKING (e.g. sqlite) + * in order to avoid deadlocks. ILoadBalancer::getServerAttributes() can be used to check * such flags beforehand. * - * If the caller uses $domain or sets CONN_TRX_AUTOCOMMIT in $flags, then it must also - * call ILoadBalancer::reuseConnection() on the handle when finished using it. + * If the caller uses $domain or sets CONN_TRX_AUTOCOMMIT in $flags, then it must + * also call ILoadBalancer::reuseConnection() on the handle when finished using it. * In all other cases, this is not necessary, though not harmful either. + * Avoid the use of begin() or startAtomic() on any such connections. * * @note This method throws DBAccessError if ILoadBalancer::disable() was called * @@ -350,6 +356,7 @@ interface ILoadBalancer { * Return the server info structure for a given index, or false if the index is invalid. * @param int $i * @return array|bool + * @since 1.31 */ public function getServerInfo( $i );