Author: jstephens
Date: 2008-07-25 07:40:13 +0200 (Fri, 25 Jul 2008)
New Revision: 11372
Log:
Committing recent work on WL#4453 (NDB/Multi-master replication)
(Commented out for now.)
Modified:
trunk/refman-5.1/mysql-cluster-limitations.xml
trunk/refman-5.1/mysql-cluster-replication.xml
Modified: trunk/refman-5.1/mysql-cluster-limitations.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-limitations.xml 2008-07-25 03:44:12 UTC (rev 11371)
+++ trunk/refman-5.1/mysql-cluster-limitations.xml 2008-07-25 05:40:13 UTC (rev 11372)
Changed blocks: 2, Lines Added: 9, Lines Deleted: 0; 927 bytes
@@ -1628,6 +1628,11 @@
</formalpara>
+ <remark role="TODO">
+ [js] WL#4453: Change xref in following when publishing new
+ mysql-cluster-replication-multi-master section
+ </remark>
+
<formalpara>
<title>Circular Replication</title>
@@ -1636,6 +1641,10 @@
Circular replication is supported for MySQL Cluster
beginning with MySQL 5.1.18. See
<xref linkend="mysql-cluster-replication-issues"/>.
+
+<!--
+ <xref linkend="mysql-cluster-replication-multi-master"/>.
+-->
</para>
</formalpara>
Modified: trunk/refman-5.1/mysql-cluster-replication.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-replication.xml 2008-07-25 03:44:12 UTC (rev 11371)
+++ trunk/refman-5.1/mysql-cluster-replication.xml 2008-07-25 05:40:13 UTC (rev 11372)
Changed blocks: 3, Lines Added: 183, Lines Deleted: 1; 7132 bytes
@@ -344,6 +344,11 @@
</listitem>
<listitem>
+ <remark role="TODO">
+ [js] WL#4453: Remove this listitem when publishing new
+ mysql-cluster-replication-multi-master section
+ </remark>
+
<formalpara>
<title>Circular replication</title>
@@ -2397,7 +2402,7 @@
or die "Prepare to CHANGE MASTER error: ", $dbhS->errstr;
$sth->execute
- or die "CHNAGE MASTER on slave error: ", $sth->errstr;
+ or die "CHANGE MASTER on slave error: ", $sth->errstr;
$sth->finish;
print "\tSlave has been updated. You may now start the slave.\n";
}
@@ -2409,6 +2414,183 @@
</section>
+<!--
+ <remark role="TODO">
+ [js] WL#4453: Uncomment this section
+ </remark>
+
+ <section id="mysql-cluster-replication-multi-master">
+
+ <title>Multi-Master and Circular Replication</title>
+
+ <para>
+ Beginning with MySQL 5.1.18, it is possible to use MySQL Cluster
+ in multi-master replication, including circular replication
+ between a number of MySQL Clusters.
+ </para>
+
+ <note>
+ <para>
+ Prior to MySQL 5.1.18, multi-master replication including
+ circular replication was not supported with MySQL Cluster
+ replication. This was because log events created in a particular
+ MySQL Cluster were wrongly tagged with the server ID of the
+ master rather than the server ID of the originating server.
+ </para>
+ </note>
+
+ <formalpara>
+
+ <title>Circular replication example</title>
+
+ <para>
+ In the next few paragraphs we consider the example of a
+ replication setup involving three MySQL Clusters numbered 1, 2,
+ and 3, in which Cluster 1 acts as the replication master for
+ Cluster 2, Cluster 2 acts as the master for Cluster 3, and
+ Cluster 3 acts as the master for Cluster 1. Each cluster has two
+ SQL nodes, with SQL nodes A and B belonging to Cluster 1, SQL
+ nodes C and D belonging to Cluster 2, and SQL nodes E and F
+ belonging to Cluster 3.
+ </para>
+
+ </formalpara>
+
+ <para>
+ Circular replication using these clusters is supported as long as:
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ The SQL nodes on all masters and slaves are the same
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ All SQL nodes acting as replication masters and slaves are
+ started using the <option>&ddash;log-slave-updates</option>
+ option
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ This type of circular replication setup is shown in the following
+ diagram:
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="../refman-common/images/published/cluster-circular-replication-1.png"
format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Cluster circular replication scheme in which
+ all master SQL nodes are also slaves.</phrase>
+ </textobject>
+ </mediaobject>
+
+ In this scenario, SQL node A in Cluster 1 replicates to SQL node C
+ in Cluster 2; SQL node C replicates to SQL node E in Cluster 3;
+ SQL node E replicates to SQL node A. In other words, the
+ replication line (indicated by the red arrows in the diagram)
+ directly connects all SQL nodes used as replication masters and
+ slaves.
+ </para>
+
+ <para>
+ It should also be possible to set up circular replication in which
+ not all master SQL nodes are also slaves, as shown here:
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="../refman-common/images/published/cluster-circular-replication-2.png"
format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Cluster circular replication scheme in which
+ all master SQL nodes are not also necessarily slaves.</phrase>
+ </textobject>
+ </mediaobject>
+
+ In this case, different SQL nodes in each cluster are used as
+ replication masters and slaves. However, you must
+ <emphasis>not</emphasis> start any of the SQL nodes using
+ <option>&ddash;log-slave-updates</option> (see the
+ <link linkend="option_mysqld_log-slave-updates">description of
+ this option</link> for more information). This type of circular
+ replication scheme for MySQL Cluster, in which the line of
+ replication (again indicated by the red arrows in the diagram) is
+ discontinuous, should be possible, but it should be noted that it
+ has not yet been thoroughly tested and must therefore still be
+ considered experimental.
+ </para>
+
+ <important>
+ <para>
+ Beginning with MySQL 5.1.24, you should execute the following
+ statement before starting circular replication:
+
+<programlisting>
+mysql> <userinput>SET GLOBAL SLAVE_EXEC_MODE =
'IDEMPOTENT';</userinput>
+</programlisting>
+
+ This is necessary to suppress duplicate-key and other errors
+ that otherwise break circular replication of MySQL Cluster.
+ <literal>IDEMPOTENT</literal> mode is also required for
+ multi-master replication when using MySQL Cluster. (Bug #31609)
+ </para>
+
+ <para>
+ See
+ <link
linkend="option_mysqld_slave_exec_mode"><literal>Slave_exec_mode</literal></link>,
+ for more information.
+ </para>
+ </important>
+
+ <formalpara>
+
+ <title>Multi-master failover example</title>
+
+ <para>
+ In this section, we discuss failing over in a multi-master MySQL Cluster
+ replication setup such as that shown here:
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="../refman-common/images/published/cluster-replication-multi-master.png"
format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="EN">Multi-master MySQL Cluster replication
+ setup, with three MySQL Clusters</phrase>
+ </textobject>
+ </mediaobject>
+ </para>
+
+ </formalpara>
+
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="../refman-common/images/published/cluster-replication-log-slave-updates.png"
format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="EN">Multi-master MySQL Cluster replication
+ setup, detail with MySQL Servers</phrase>
+ </textobject>
+ </mediaobject>
+ </para>
+
+ <note>
+ <para>
+ Replication slaves must be run with the
+ <option>&ddash;log-slave-updates</option> option. Using this
option
+ has no effect on servers not being run as replication slaves.
+ </para>
+ </note>
+
+ </section>
+-->
+
<section id="mysql-cluster-replication-conflict-resolution">
<title>MySQL Cluster Replication Conflict Resolution</title>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r11372 - trunk/refman-5.1 | jon | 25 Jul |