Author: paul
Date: 2008-11-14 21:36:34 +0100 (Fri, 14 Nov 2008)
New Revision: 12487
Log:
r35731@frost: paul | 2008-11-14 14:38:09 -0500
Revisions to semisync replication material
Modified:
trunk/refman-6.0/semisync-repl-tmp.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:39854
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:35728
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:34365
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:39854
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:35731
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:34365
Modified: trunk/refman-6.0/semisync-repl-tmp.xml
===================================================================
--- trunk/refman-6.0/semisync-repl-tmp.xml 2008-11-14 20:19:11 UTC (rev 12486)
+++ trunk/refman-6.0/semisync-repl-tmp.xml 2008-11-14 20:36:34 UTC (rev 12487)
Changed blocks: 14, Lines Added: 179, Lines Deleted: 138; 16819 bytes
@@ -17,8 +17,8 @@
</indexterm>
<para>
- MySQL 6.0.x and up supports semisynchronous replication in addition
- to asynchronous replication. This section discusses what
+ As of version 6.0.x, MySQL supports semisynchronous replication in
+ addition to asynchronous replication. This section discusses what
semisynchronous replication is and how it works. The following
sections cover the adminstrative interface to semisynchronous
replication and how to install, configure, and monitor it.
@@ -61,7 +61,7 @@
<listitem>
<para>
The slave acknowledges receipt of a transaction's events only
- after the events have been written to the relay log and flushed
+ after the events have been written to its relay log and flushed
to disk.
</para>
</listitem>
@@ -99,9 +99,10 @@
<para>
Blocking also occurs after rollbacks that are written to the binary
log, which occurs when a transaction that modifies non-transactional
- tables is rolled back. The rolled-back transaction is logged because
- it modifies the non-transactional tables even though it has no
- effect for transactional tables.
+ tables is rolled back. The rolled-back transaction is logged even
+ though it has no effect for transactional tables because the
+ modifications to the non-transactional tables cannot be rolled back
+ and must be sent to slaves.
</para>
<para>
@@ -110,8 +111,8 @@
<literal role="stmt" condition="commit">START TRANSACTION</literal>
or <literal>SET AUTOCOMMIT = 0</literal>), autocommit is enabled and
each statement commits implicitly. With semisynchronous replication,
- the master blocks for each such statement, just as it does for
- explicit transaction commits.
+ the master blocks after committing each such statement, just as it
+ does for explicit transaction commits.
</para>
<para>
@@ -143,11 +144,11 @@
<listitem>
<para>
Semisynchronous replication falls between asynchronous and fully
- synchronous replication. The master waits only until at least
- one slave has received and logged the events. It does not wait
- for all slaves to acknowledge receipt, and it requires only
- receipt, not that the events have been processed and committed
- on the slave side.
+ synchronous replication. The master waits after commit only
+ until at least one slave has received and logged the events. It
+ does not wait for all slaves to acknowledge receipt, and it
+ requires only receipt, not that the events have been processed
+ and committed on the slave side.
</para>
</listitem>
@@ -155,10 +156,12 @@
<para>
Compared to asynchronous replication, semisynchronous replication
- provides improved data integrity. When a commit returns, it is known
- that the data exists in at least two places. If the master crashes
- after having committed a transaction, at least one slave is
- guaranteed to have received it.
+ provides improved data integrity. When a commit returns
+ successfully, it is known that the data exists in at least two
+ places (on the master and at least one slave). If the master commits
+ but a crash occurs while the master is waiting for acknowledgment
+ from a slave, it is possible that the transaction may not have
+ reached any slave.
</para>
<para>
@@ -182,124 +185,145 @@
</indexterm>
<para>
- The administrative interface to semisynchronous replication has
- several components:
+ [TODO] Given that there seem to be more variables now, perhaps
+ just mention their existence here and point to the DBA chapter for
+ the descriptions.
</para>
<para>
- Two plugins implement semisynchronous capability. There is one
- plugin for the master side and one for the slave side.
+ The administrative interface to semisynchronous replication has
+ several components:
</para>
- <para>
- System variables control plugin behavior:
- </para>
-
<itemizedlist>
<listitem>
<para>
- <literal>rpl_semi_sync_master_enabled</literal>
+ Two plugins implement semisynchronous capability. There is one
+ plugin for the master side and one for the slave side.
</para>
-
- <para>
- Controls whether semisynchronous replication is enabled on the
- master. To enable or disable the plugin, set this variable to
- 1 or 0, respectively. The default is 0.
- </para>
</listitem>
<listitem>
<para>
- <literal>rpl_semi_sync_slave_enabled</literal>
+ System variables control plugin behavior:
</para>
- <para>
- Similar, but controls the slave plugin.
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>rpl_semi_sync_master_timeout</literal>
- </para>
+ <listitem>
+ <para>
+ <literal>rpl_semi_sync_master_enabled</literal>
+ </para>
- <para>
- A value in seconds that controls how long the master waits on
- a commit for acknowledgment from a slave before timing out and
- reverting to asynchronous replication. The default value is 10
- seconds.
- </para>
- </listitem>
+ <para>
+ Controls whether semisynchronous replication is enabled on
+ the master. To enable or disable the plugin, set this
+ variable to 1 or 0, respectively. The default is 0.
+ </para>
+ </listitem>
- </itemizedlist>
+ <listitem>
+ <para>
+ <literal>rpl_semi_sync_master_timeout</literal>
+ </para>
- <para>
- Status variables enable semisynchronous replication monitoring:
- </para>
+ <para>
+ A value in seconds that controls how long the master waits
+ on a commit for acknowledgment from a slave before timing
+ out and reverting to asynchronous replication. The default
+ value is 10 seconds.
+ </para>
+ </listitem>
- <itemizedlist>
+ <listitem>
+ <para>
+ <literal>rpl_semi_sync_slave_enabled</literal>
+ </para>
- <listitem>
- <para>
- <literal>Rpl_semi_sync_master_clients</literal>
- </para>
+ <para>
+ Similar to
+ <literal>rpl_semi_sync_master_enabled</literal>, but
+ controls the slave plugin.
+ </para>
+ </listitem>
- <para>
- The number of semisynchronous slaves.
- </para>
+ </itemizedlist>
</listitem>
<listitem>
<para>
- <literal>Rpl_semi_sync_master_status</literal>
+ Status variables enable semisynchronous replication
+ monitoring:
</para>
- <para>
- Whether semisynchronous replication currently is operational
- on the master. This is 1 if the plugin has been enabled and a
- commit acknowledgment has not occurred. It is 0 if the plugin
- is not enabled or the master has falled back to asynchronous
- replication due to commit acknowledgment timeout.
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>Rpl_semi_sync_master_no_tx</literal>
- </para>
+ <listitem>
+ <para>
+ <literal>Rpl_semi_sync_master_clients</literal>
+ </para>
- <para>
- The number of commits that were not acknowledged successfully.
- </para>
- </listitem>
+ <para>
+ The number of semisynchronous slaves.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>Rpl_semi_sync_master_yes_tx</literal>
- </para>
+ <listitem>
+ <para>
+ <literal>Rpl_semi_sync_master_status</literal>
+ </para>
- <para>
- The number of commits that were acknowledged successfully.
- </para>
- </listitem>
+ <para>
+ Whether semisynchronous replication currently is
+ operational on the master. The value is 1 if the plugin
+ has been enabled and a commit acknowledgment has not
+ occurred. It is 0 if the plugin is not enabled or the
+ master has fallen back to asynchronous replication due to
+ commit acknowledgment timeout.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>Rpl_semi_sync_slave_status</literal>
- </para>
+ <listitem>
+ <para>
+ <literal>Rpl_semi_sync_master_no_tx</literal>
+ </para>
- <para>
- Whether semisynchronous replication currently is operational
- on the slave. This is 1 if the plugin has been enabled and the
- slave I/O thread is running, 0 otherwise.
- </para>
+ <para>
+ The number of commits that were not acknowledged
+ successfully.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>Rpl_semi_sync_master_yes_tx</literal>
+ </para>
+
+ <para>
+ The number of commits that were acknowledged successfully.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>Rpl_semi_sync_slave_status</literal>
+ </para>
+
+ <para>
+ Whether semisynchronous replication currently is
+ operational on the slave. This is 1 if the plugin has been
+ enabled and the slave I/O thread is running, 0 otherwise.
+ </para>
+ </listitem>
+
+ </itemizedlist>
</listitem>
</itemizedlist>
<para>
- The system and status variables are unavailable unless the
+ The system and status variables are available only if the
appropriate master or slave plugin has been installed with
<literal role="stmt">INSTALL PLUGIN</literal>.
</para>
@@ -308,7 +332,7 @@
<section id="replication-semisync-installation">
- <title>Semisynchronous Replication Installation, Configuration, and
Monitoring</title>
+ <title>Semisynchronous Replication Installation and Configuration</title>
<indexterm>
<primary>semisynchronous replication</primary>
@@ -320,53 +344,56 @@
<secondary>configuration</secondary>
</indexterm>
- <indexterm>
- <primary>semisynchronous replication</primary>
- <secondary>monitoring</secondary>
- </indexterm>
-
<para>
Semisynchronous replication is implemented using plugins, so the
plugins must be installed into the server to make them available.
After a plugin has been installed, you control it by means of the
- system variables associated with it. (These system variables are
- not available until the associated plugin has been installed.)
+ system variables associated with it. These system variables are
+ unavailable until the associated plugin has been installed.
</para>
<para>
- Semisynchronous replication is available beginning with MySQL
- 6.0.x. The plugins are included in MySQL binary distributions. If
- you build MySQL from source, the plugins will be compiled and
- installed along with the rest of the distribution; no special
- configuration options are required.
+ The capability of installing plugins requires a server that
+ supports dynamic loading. To verify this, check that the value of
+ the <literal>have_dynamic_loading</literal> system variable is
+ <literal>YES</literal>. Binary distributions should support
+ dynamic loading. If you compile MySQL from source, do not
+ configure the source distribution with the
+ <option>--with-mysqld-ldflags=-all-static</option> option.
</para>
<para>
+ The semisynchronous replication plugins are not included with
+ MySQL distributions. Instead, they are distributed as a separate
+ component.
+ </para>
+
+ <para>
+ [TODO] Give URL for obtaining
+ </para>
+
+ <para>
Currently, the plugins are available only on Unix. Windows is not
yet supported.
</para>
<para>
To set up semisynchronous replication, use the following
- procedure. These instructions assume that you already have a
- working replication set up. If you do not, see
- <xref linkend="replication-howto"/>, for information on setting up
- a master/slave relationship.
- </para>
-
- <para>
- The <literal role="stmt">INSTALL PLUGIN</literal>,
+ procedure. The <literal role="stmt">INSTALL PLUGIN</literal>,
<literal role="stmt" condition="set-option">SET GLOBAL</literal>,
<literal role="stmt">STOP SLAVE</literal>, and
<literal role="stmt">START SLAVE</literal> statements mentioned in
these instructions require the
- <literal role="priv">SUPER</literal> privilege.
+ <literal role="priv">SUPER</literal> privilege. The instructions
+ assume that you already have replication working. For information
+ on creating a master/slave relationship, see
+ <xref linkend="replication-howto"/>.
</para>
<para>
- To load the plugins, use <literal role="stmt">INSTALL
- PLUGIN</literal> on the master and on each slave that is to be
- semisynchronous.
+ To load the plugins, use the <literal role="stmt">INSTALL
+ PLUGIN</literal> statement on the master and on each slave that is
+ to be semisynchronous.
</para>
<para>
@@ -400,7 +427,7 @@
</para>
<para>
- [At this point, system/status variables become visible]
+ [TODO] At this point, system/status variables become visible.
</para>
<para>
@@ -411,8 +438,8 @@
</para>
<para>
- [I found that simply installing the plugin enabled it, at least on
- the master side]
+ [TODO] I found that simply installing the plugin enabled it, at
+ least on the master side.
</para>
<para>
@@ -473,7 +500,8 @@
replication can be set as command-line options or in an option
file. A setting listed in an option file takes effect each time
the server starts. For example, you can set the variables in
- my.cnf files on the master and slave sides like this:
+ <filename>my.cnf</filename> files on the master and slave sides
+ like this:
</para>
<para>
@@ -495,21 +523,43 @@
rpl_semi_sync_slave_enabled=1
</programlisting>
+ </section>
+
+ <section id="replication-semisync-monitoring">
+
+ <title>Semisynchronous Replication Monitoring</title>
+
+ <indexterm>
+ <primary>semisynchronous replication</primary>
+ <secondary>monitoring</secondary>
+ </indexterm>
+
<para>
- To check the values of the semisynchronous replication system
- variables (regardless of whether you set them at startup or at
- runtime), use <literal role="stmt">SHOW VARIABLES</literal>:
+ The plugins for the semisynchronous replication capability expose
+ several system and status variables that you can examine to
+ determine its configuration and operational state.
</para>
+ <para>
+ The system variable reflect how semisynchronous replication is
+ configured. To check their values, use <literal role="stmt">SHOW
+ VARIABLES</literal>:
+ </para>
+
<programlisting>
mysql> <userinput>SHOW VARIABLES LIKE 'rpl_semi_sync%';</userinput>
</programlisting>
<para>
- The plugins expose several status variables that enable you to
- monitor the operation of semisynchronous replication.
+ The status variables enable you to monitor the operation of
+ semisynchronous replication. To check their values, use
+ <literal role="stmt">SHOW STATUS</literal>:
</para>
+<programlisting>
+mysql> <userinput>SHOW STATUS LIKE 'Rpl_semi_sync%';</userinput>
+</programlisting>
+
<para>
When the master switches between asynchronous or semisynchronous
replication due to commit-blocking timeout or a slave catching up,
@@ -544,15 +594,6 @@
operational.
</para>
- <para>
- To check the values of the semisynchronous replication status
- variables, use <literal role="stmt">SHOW STATUS</literal>:
- </para>
-
-<programlisting>
-mysql> <userinput>SHOW STATUS LIKE 'Rpl_semi_sync%';</userinput>
-</programlisting>
-
</section>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r12487 - in trunk: . refman-6.0 | paul.dubois | 14 Nov |