Author: jstephens
Date: 2010-08-31 13:20:02 +0200 (Tue, 31 Aug 2010)
New Revision: 22516
Log:
Documented fix for Cluster BUG#47037
IGNORE_SERVER_IDS option for CHANGE MASTER TO
Changes on SHOW SLAVE STATUS output
Modified:
trunk/dynamic-docs/changelog/mysqld-2.xml
trunk/refman-5.1/mysql-cluster-overview.xml
trunk/refman-5.1/mysql-cluster-replication-core.xml
trunk/refman-5.1/sql-syntax-replication.xml
trunk/refman-5.1/sql-syntax-server-administration.xml
Modified: trunk/dynamic-docs/changelog/mysqld-2.xml
===================================================================
--- trunk/dynamic-docs/changelog/mysqld-2.xml 2010-08-31 11:10:49 UTC (rev 22515)
+++ trunk/dynamic-docs/changelog/mysqld-2.xml 2010-08-31 11:20:02 UTC (rev 22516)
Changed blocks: 1, Lines Added: 55, Lines Deleted: 0; 2121 bytes
@@ -6,6 +6,61 @@
]>
<changelog>
+ <logentry entrytype="feature">
+
+ <tags>
+ <highlight type="clusterreplication"/>
+ <manual type="CHANGE MASTER TO"/>
+ </tags>
+
+ <bugs>
+ <fixes bugid="47037"/>
+ <seealsobug bugid="25998"/>
+ <seealsobug bugid="27808"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.39-ndb-6.2.19"/>
+ <version ver="5.1.41-ndb-6.3.31"/>
+ <version ver="5.1.41-ndb-7.0.11"/>
+ <version ver="5.1.39-ndb-7.1.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ In circular replication, it was sometimes possible for an event
+ to propagate such that it would be reapplied on all servers.
+ This could occur when the originating server was removed from
+ the replication circle and so could no longer act as the
+ terminator of its own events, as normally happens in circular
+ replication.
+ </para>
+
+ <para>
+ To prevent this from occurring, a new
+ <literal>IGNORE_SERVER_IDS</literal> option is introduced for
+ the <literal>CHANGE MASTER TO</literal> statement. This option
+ takes a list of replication server IDs; events having a server
+ ID which appears in this list are ignored and not applied. For
+ more information, see <xref linkend="change-master-to"/>.
+ </para>
+
+ <para>
+ In conjunction with the introduction of
+ <literal>IGNORE_SERVER_IDS</literal>, <literal role="stmt">SHOW
+ SLAVE STATUS</literal> has two new fields.
+ <literal>Replicate_Ignore_Server_Ids</literal> displays
+ information about ignored servers.
+ <literal>Master_Server_Id</literal> displays the
+ <literal role="sysvar">server_id</literal> value from the
+ master.
+ </para>
+
+ </message>
+
+ </logentry>
+
<logentry entrytype="bug">
<tags>
Modified: trunk/refman-5.1/mysql-cluster-overview.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-overview.xml 2010-08-31 11:10:49 UTC (rev 22515)
+++ trunk/refman-5.1/mysql-cluster-overview.xml 2010-08-31 11:20:02 UTC (rev 22516)
Changed blocks: 4, Lines Added: 97, Lines Deleted: 0; 4591 bytes
@@ -1322,6 +1322,30 @@
<xref linkend="mysql-cluster-ndbinfo"/>.
</para>
</listitem>
+
+ <listitem>
+ <formalpara>
+
+ <title>New <literal role="stmt">CHANGE MASTER TO</literal> option for circular
+ replication</title>
+
+ <para>
+ Beginning with MySQL Cluster NDB 7.1.0, the
+ <literal role="stmt">CHANGE MASTER TO</literal> statement
+ supports an <literal>IGNORE_SERVER_IDS</literal> option
+ which takes a comma-separated list of server IDs and
+ causes events originating from the corresponding servers
+ to be ignored. (Log rotation and log deletion events are
+ preserved.)
+ </para>
+
+ </formalpara>
+
+ <para>
+ See <xref linkend="change-master-to"/>, as well as
+ <xref linkend="show-slave-status"/>, for more information.
+ </para>
+ </listitem>
<listitem>
<formalpara>
@@ -2248,6 +2272,30 @@
<listitem>
<formalpara>
+ <title>New <literal role="stmt">CHANGE MASTER TO</literal> option for circular
+ replication</title>
+
+ <para>
+ Beginning with MySQL Cluster NDB 7.0.11, the
+ <literal role="stmt">CHANGE MASTER TO</literal> statement
+ supports an <literal>IGNORE_SERVER_IDS</literal> option
+ which takes a comma-separated list of server IDs and
+ causes events originating from the corresponding servers
+ to be ignored. (Log rotation and log deletion events are
+ preserved.)
+ </para>
+
+ </formalpara>
+
+ <para>
+ See <xref linkend="change-master-to"/>, as well as
+ <xref linkend="show-slave-status"/>, for more information.
+ </para>
+ </listitem>
+
+ <listitem>
+ <formalpara>
+
<title>New replication conflict resolution strategy</title>
<para>
@@ -3177,6 +3225,30 @@
</formalpara>
</listitem>
+
+ <listitem>
+ <formalpara>
+
+ <title>New <literal role="stmt">CHANGE MASTER TO</literal> option for circular
+ replication</title>
+
+ <para>
+ Beginning with MySQL Cluster NDB 6.3.31, the
+ <literal role="stmt">CHANGE MASTER TO</literal> statement
+ supports an <literal>IGNORE_SERVER_IDS</literal> option
+ which takes a comma-separated list of server IDs and
+ causes events originating from the corresponding servers
+ to be ignored. (Log rotation and log deletion events are
+ preserved.)
+ </para>
+
+ </formalpara>
+
+ <para>
+ See <xref linkend="change-master-to"/>, as well as
+ <xref linkend="show-slave-status"/>, for more information.
+ </para>
+ </listitem>
<listitem>
<formalpara>
@@ -3779,6 +3851,31 @@
added in MySQL Cluster NDB 6.2.19.
</para>
</listitem>
+
+
+ <listitem>
+ <formalpara>
+
+ <title>New <literal role="stmt">CHANGE MASTER TO</literal> option for circular
+ replication</title>
+
+ <para>
+ Beginning with MySQL Cluster NDB 6.2.19, the
+ <literal role="stmt">CHANGE MASTER TO</literal> statement
+ supports an <literal>IGNORE_SERVER_IDS</literal> option
+ which takes a comma-separated list of server IDs and
+ causes events originating from the corresponding servers
+ to be ignored. (Log rotation and log deletion events are
+ preserved.)
+ </para>
+
+ </formalpara>
+
+ <para>
+ See <xref linkend="change-master-to"/>, as well as
+ <xref linkend="show-slave-status"/>, for more information.
+ </para>
+ </listitem>
</itemizedlist>
</para>
Modified: trunk/refman-5.1/mysql-cluster-replication-core.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-replication-core.xml 2010-08-31 11:10:49 UTC (rev 22515)
+++ trunk/refman-5.1/mysql-cluster-replication-core.xml 2010-08-31 11:20:02 UTC (rev 22516)
Changed blocks: 1, Lines Added: 11, Lines Deleted: 0; 1014 bytes
@@ -3185,6 +3185,17 @@
be replicated to server F.
</para>
+ <para>
+ Beginning with MySQL Cluster MySQL Cluster NDB 6.1.29, MySQL
+ Cluster NDB 6.3.31, MySQL Cluster NDB 7.0.11, and MySQL Cluster
+ NDB 7.1.0, the <literal role="stmt">CHANGE MASTER TO</literal>
+ statement also supports an <literal>IGNORE_SERVER_IDS</literal>
+ option which takes a comma-separated list of server IDs and causes
+ events originating from the corresponding servers to be ignored.
+ For more information, see <xref linkend="change-master-to"/>, and
+ <xref linkend="show-slave-status"/>.
+ </para>
+
</section>
<section id="mysql-cluster-replication-conflict-resolution">
Modified: trunk/refman-5.1/sql-syntax-replication.xml
===================================================================
--- trunk/refman-5.1/sql-syntax-replication.xml 2010-08-31 11:10:49 UTC (rev 22515)
+++ trunk/refman-5.1/sql-syntax-replication.xml 2010-08-31 11:20:02 UTC (rev 22516)
Changed blocks: 3, Lines Added: 56, Lines Deleted: 5; 3970 bytes
@@ -428,11 +428,12 @@
<remark role="help-topic" condition="CHANGE MASTER TO"/>
<remark role="help-keywords">
- CHANGE MASTER TO MASTER_BIND MASTER_HEARTBEAT_PERIOD MASTER_HOST
- MASTER_USER MASTER_PASSWORD MASTER_PORT MASTER_LOG_FILE
- MASTER_LOG_POS MASTER_CONNECT_RETRY RELAY_LOG_POS RELAY_LOG_FILE
- MASTER_SSL MASTER_SSL_CA MASTER_SSL_CERT MASTER_SSL_KEY
- MASTER_SSL_CIPHER MASTER_SSL_VERIFY_SERVER_CERT
+ CHANGE MASTER TO IGNORE_SERVER_IDS MASTER_BIND
+ MASTER_HEARTBEAT_PERIOD MASTER_HOST MASTER_USER MASTER_PASSWORD
+ MASTER_PORT MASTER_LOG_FILE MASTER_LOG_POS MASTER_CONNECT_RETRY
+ RELAY_LOG_POS RELAY_LOG_FILE MASTER_SSL MASTER_SSL_CA
+ MASTER_SSL_CERT MASTER_SSL_KEY MASTER_SSL_CIPHER
+ MASTER_SSL_VERIFY_SERVER_CERT
</remark>
<remark role="help-syntax"/>
@@ -459,6 +460,10 @@
| MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
| MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
| MASTER_SSL_VERIFY_SERVER_CERT = {0|1}
+ | IGNORE_SERVER_IDS = (<replaceable>server_id_list</replaceable>)
+
+<replaceable>server_id_list</replaceable>:
+ [<replaceable>server_id</replaceable> [, <replaceable>server_id</replaceable>] ... ]
</programlisting>
<remark role="help-description-begin"/>
@@ -657,6 +662,52 @@
</para>
<para>
+ <literal>IGNORE_SERVER_IDS</literal> was added in MySQL Cluster
+ NDB 6.1.29, MySQL Cluster NDB 6.3.31, MySQL Cluster NDB 7.0.11,
+ and MySQL Cluster NDB 7.1.0 (see Bug#47037). This option takes a
+ comma-separated list of 0 or more server IDs. Events originating
+ from the corresponding servers are ignored, with the exception
+ of log rotation and deletion events, which are still recorded in
+ the relay log.
+ </para>
+
+ <para>
+ In circular replication, the originating server normally acts as
+ the terminator of its own events, so that they are not applied
+ more than once. Thus, this option is useful in circular
+ replication when one of the servers in the circle is removed.
+ Suppose that you have a circular replication setup with 4
+ servers, having server IDs 1, 2, 3, and 4, and server 3 fails.
+ When bridging the gap by starting replication from server 2 to
+ server 4, you can include <literal>IGNORE_SERVER_IDS =
+ (3)</literal> in the <literal role="stmt">CHANGE MASTER
+ TO</literal> statement that you issue on server 4 to tell it to
+ use server 2 as its master instead of server 3. Doing so causes
+ it to ignore and not to propagate any statements that originated
+ with the server that is no longer in use.
+ </para>
+
+ <para>
+ If a <literal role="stmt">CHANGE MASTER TO</literal> statement
+ is issued without any <literal>IGNORE_SERVER_IDS</literal>
+ option, any existing list is preserved;
+ <literal role="stmt">RESET SLAVE</literal> also has no effect on
+ the server ID list. To clear the list of ignored servers, it is
+ necessary to use the option with an empty list:
+ </para>
+
+<programlisting>
+CHANGE MASTER TO IGNORE_SERVER_IDS = ();
+</programlisting>
+
+ <para>
+ If <literal>IGNORE_SERVER_IDS</literal> contains the
+ server's own ID and the server was started with the
+ <option role="mysqld">--replicate-same-server-id</option> option
+ enabled, an error results.
+ </para>
+
+ <para>
Beginning with MySQL 5.1.47, invoking
<literal role="stmt">CHANGE MASTER TO</literal> causes the
previous values for <literal>MASTER_HOST</literal>,
Modified: trunk/refman-5.1/sql-syntax-server-administration.xml
===================================================================
--- trunk/refman-5.1/sql-syntax-server-administration.xml 2010-08-31 11:10:49 UTC (rev 22515)
+++ trunk/refman-5.1/sql-syntax-server-administration.xml 2010-08-31 11:20:02 UTC (rev 22516)
Changed blocks: 1, Lines Added: 36, Lines Deleted: 0; 1924 bytes
@@ -9081,6 +9081,42 @@
</formalpara>
</listitem>
+ <listitem>
+ <para>
+ <literal>Replicate_Ignore_Server_Ids</literal> (MySQL
+ Cluster only)
+ </para>
+
+ <para>
+ Beginning with MySQL Cluster NDB 6.1.29, MySQL Cluster NDB
+ 6.3.31, MySQL Cluster NDB 7.0.11, and MySQL Cluster NDB
+ 7.1.0, you can tell a slave to ignore events from 0 or more
+ masters using the <literal>IGNORE_SERVER_IDS</literal>
+ option in a <literal role="stmt">CHANGE MASTER TO</literal>
+ statement. (See Bug#47037.) This is normally of interest
+ only when using a circular or other multi-master replication
+ setup.
+ </para>
+
+ <para>
+ The message shown for
+ <literal>Replicate_Ignore_Server_Ids</literal> consists of a
+ space-delimited list of one or more numbers, the first value
+ indicating the number of servers to be ignored; if not 0
+ (the default), this server-count value is followed by the
+ actual server IDs. For example, if a
+ <literal role="stmt">CHANGE MASTER TO</literal> statement
+ containing the <literal>IGNORE_SERVER_IDS =
+ (2,6,9)</literal> option has been issued to tell a slave to
+ ignore masters having the server ID 2, 6, or 9, that
+ information appears as shown here:
+ </para>
+
+<programlisting>
+ Replicate_Ignore_Server_Ids: 3 2 6 9
+</programlisting>
+ </listitem>
+
</itemizedlist>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r22516 - in trunk: dynamic-docs/changelog refman-5.1 | jon.stephens | 31 Aug |