mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
At least mention mysqlnd_ms_xa_gc()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334100 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
433a03df9b
commit
c6adaac08d
2 changed files with 129 additions and 0 deletions
128
reference/mysqlnd_ms/functions/mysqlnd-ms-xa-gc.xml
Normal file
128
reference/mysqlnd_ms/functions/mysqlnd-ms-xa-gc.xml
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 327381 $ -->
|
||||
|
||||
<refentry xml:id="function.mysqlnd-ms-xa-gc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>mysqlnd_ms_xa_gc</refname>
|
||||
<refpurpose>Garbage collects unfinished XA transactions after severe errors</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type>
|
||||
<methodname>mysqlnd_ms_xa_gc</methodname>
|
||||
<methodparam><type>mixed</type><parameter>connection</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>gtrid</parameter></methodparam>
|
||||
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Garbage collects unfinished XA transactions.
|
||||
</para>
|
||||
<para>
|
||||
The XA protocol is a blocking protocol. There exist cases when servers
|
||||
participating in a global transaction cannot make progress when the transaction
|
||||
coordinator crashes or disconnects. In such a case, the MySQL servers
|
||||
keep waiting for instructions to finish the XA transaction in question.
|
||||
Because transactions occupy resources, transactions should always be
|
||||
terminated properly.
|
||||
</para>
|
||||
<para>
|
||||
Garbage collection requires configuring a state store to track global
|
||||
transactions. Should a PHP client crash in the middle of a transaction
|
||||
and a new PHP client be started, then the built-in garbage collection
|
||||
can learn about the aborted global transaction and terminate it. If you
|
||||
do not configure a state store, the garbage collection cannot perform
|
||||
any cleanup tasks.
|
||||
</para>
|
||||
<para>
|
||||
The state store should be crash-safe and be highly available to survive
|
||||
its own crash. Currently, only MySQL is supported as a state store.
|
||||
</para>
|
||||
<para>
|
||||
Garbage collection can also be performed automatically in the background.
|
||||
See the plugin configuration directive <literal>garbage_collection</literal>
|
||||
for details.
|
||||
</para>
|
||||
<note>
|
||||
<title>Experimental</title>
|
||||
<para>
|
||||
The feature is currently under development. There may be issues and/or
|
||||
feature limitations. Do not use in production environments.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>connection</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A MySQL connection handle obtained from any of the
|
||||
connect functions of the <link linkend="ref.mysqli">mysqli</link>,
|
||||
<link linkend="ref.mysql">mysql</link> or
|
||||
<link linkend="ref.pdo-mysql">PDO_MYSQL</link> extensions.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>gtrid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Global transaction identifier (gtrid). If given, the garbage
|
||||
collection considers the transaction only. Otherwise,
|
||||
the state store is scanned for any unfinished transaction.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the global transaction has been rolled back. Otherwise, returns &false;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>
|
||||
<link linkend="mysqlnd-ms.quickstart.xa_transactions">Quickstart XA/Distributed transactions</link>
|
||||
</member>
|
||||
<member>
|
||||
<link linkend="mysqlnd-ms.configuration">Runtime configuration</link>
|
||||
</member>
|
||||
<member>
|
||||
<link linkend="ini.mysqlnd-ms-plugin-config-v2.xa">State store configuration</link>
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -17,6 +17,7 @@
|
|||
<function name='mysqlnd_ms_xa_begin' from='PECL mysqlnd_ms < 1.6.0'/>
|
||||
<function name='mysqlnd_ms_xa_commit' from='PECL mysqlnd_ms < 1.6.0'/>
|
||||
<function name='mysqlnd_ms_xa_rollback' from='PECL mysqlnd_ms < 1.6.0'/>
|
||||
<function name='mysqlnd_ms_xa_gc' from='PECL mysqlnd_ms < 1.6.0'/>
|
||||
</versions>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue