List:Commits« Previous MessageNext Message »
From:jon Date:January 12 2009 1:23am
Subject:svn commit - mysqldoc@docsrva: r13096 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2009-01-12 02:23:08 +0100 (Mon, 12 Jan 2009)
New Revision: 13096

Log:

Added alternative online add node method

Documented NodeGroup data node config param (new in 6.4)

Added some remarks about using ndbmtd in lieu of ndbd, and about mixing
ndbd and ndbmtd in the same cluster

Rebuilt dependencies



Modified:
   trunk/refman-5.1/Makefile.depends
   trunk/refman-5.1/mysql-cluster-configuration.xml
   trunk/refman-5.1/mysql-cluster-management.xml
   trunk/refman-5.1/mysql-cluster-process-management.xml


Modified: trunk/refman-5.1/Makefile.depends
===================================================================
--- trunk/refman-5.1/Makefile.depends	2009-01-11 23:18:25 UTC (rev 13095)
+++ trunk/refman-5.1/Makefile.depends	2009-01-12 01:23:08 UTC (rev 13096)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 709 bytes

@@ -3377,6 +3377,7 @@
 	../refman-5.1/metadata/mysql-cluster-security.idmap \
 	../refman-5.1/metadata/mysql-cluster-upgrade-downgrade.idmap \
 	../refman-5.1/metadata/replication-notes.idmap \
+	../refman-5.1/metadata/sql-syntax-data-definition.idmap \
 	../refman-5.1/metadata/sql-syntax-server-administration.idmap
 mysql-cluster-management.validpure: $(mysql_cluster_management_SOURCES)
 mysql-cluster-management.titles: $(mysql_cluster_management_SOURCES)


Modified: trunk/refman-5.1/mysql-cluster-configuration.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-configuration.xml	2009-01-11 23:18:25 UTC (rev 13095)
+++ trunk/refman-5.1/mysql-cluster-configuration.xml	2009-01-12 01:23:08 UTC (rev 13096)
Changed blocks: 2, Lines Added: 48, Lines Deleted: 0; 2973 bytes

@@ -1928,6 +1928,45 @@
 
         <listitem>
           <indexterm>
+            <primary>NodeGroup</primary>
+          </indexterm>
+
+          <para id="mysql-cluster-param-ndbd-definition-nodegroup">
+            <literal>NodeGroup</literal>
+          </para>
+
+          <para>
+            This parameter can be used to assign a data node to a
+            specific node group. It is read only when the cluster is
+            started for the first time, and cannot be used to reassign a
+            data node to a different node group online. It is generally
+            not desirable to use this parameter in the <literal>[ndbd
+            default]</literal> section of the
+            <filename>config.ini</filename> file, and care must be taken
+            not to assign nodes to node groups in such a way that an
+            invalid numbers of nodes are assigned to any node groups.
+          </para>
+
+          <para>
+            The <literal>NodeGroup</literal> parameter is chiefly
+            intended for use in adding a new node group to a running
+            MySQL Cluster without having to perform a rolling restart.
+            For this purpose, you should set it to 65535 (the maximum
+            value). You are not required to set a
+            <literal>NodeGroup</literal> value for all cluster data
+            nodes, only for those nodes which are to be started and
+            added to the cluster as a new node group at a later time.
+            For more information, see
+            <xref linkend="mysql-cluster-online-add-node-example"/>.
+          </para>
+
+          <para>
+            This parameter was added in MySQL Cluster NDB 6.4.0.
+          </para>
+        </listitem>
+
+        <listitem>
+          <indexterm>
             <primary>NoOfReplicas</primary>
           </indexterm>
 

@@ -6897,6 +6936,15 @@
               <entry>N</entry>
             </row>
             <row>
+              <entry><literal><link linkend="mysql-cluster-param-ndbd-definition-nodegroup">NodeGroup</link></literal>
+                (Added in MySQL Cluster NDB 6.4.0)</entry>
+              <entry>integer</entry>
+              <entry><literal>UNDEFINED</literal> (normally determined by management server)</entry>
+              <entry>0</entry>
+              <entry>65535</entry>
+              <entry>SI</entry>
+            </row>
+            <row>
               <entry><literal><link linkend="mysql-cluster-param-ndbd-definition-noofdiskpagestodiskafterrestartacc">NoOfDiskPagesToDiskAfterRestartACC</link></literal>
                 (<emphasis>DEPRECATED</emphasis> as of MySQL 5.1.6)</entry>
               <entry>integer (number of 8KB pages per 100 milliseconds)</entry>


Modified: trunk/refman-5.1/mysql-cluster-management.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-management.xml	2009-01-11 23:18:25 UTC (rev 13095)
+++ trunk/refman-5.1/mysql-cluster-management.xml	2009-01-12 01:23:08 UTC (rev 13096)
Changed blocks: 10, Lines Added: 153, Lines Deleted: 17; 8428 bytes

@@ -9215,6 +9215,12 @@
       </para>
 
       <para>
+        This procedure applies whether you are using
+        <command>ndbd</command> or <command>ndbmtd</command> binaries
+        for the data node processes.
+      </para>
+
+      <para>
         Assuming that you already have a running MySQL Cluster, adding
         data nodes online requires the following steps:
 

@@ -9237,6 +9243,14 @@
               Perform a rolling restart of all MySQL Cluster management
               servers.
             </para>
+
+            <important>
+              <para>
+                All management servers must be restarted with the
+                <option>--reload</option> or <option>--initial</option>
+                option to force the reading of the new configuration.
+              </para>
+            </important>
           </listitem>
 
           <listitem>

@@ -9291,10 +9305,7 @@
               (including the new ones) by issuing an <literal>ALTER
               ONLINE TABLE ... REORGANIZE PARTITION</literal> statement
               in the <command>mysql</command> client for each
-              <literal>NDBCLUSTER</literal> table. To reclaim wasted
-              memory, issue an <literal>OPTIMIZE TABLE</literal>
-              statement for each <literal>NDBCLUSTER</literal> table as
-              well.
+              <literal>NDBCLUSTER</literal> table.
             </para>
 
             <note>

@@ -9311,10 +9322,8 @@
             <para>
               Reclaim the space freed on the <quote>old</quote> nodes by
               issuing, for each <literal>NDBCLUSTER</literal> table, an
-              <literal
-              role="stmt">OPTIMIZE
-              TABLE</literal> statement in the <command>mysql</command>
-              client.
+              <literal role="stmt">OPTIMIZE TABLE</literal> statement in
+              the <command>mysql</command> client.
             </para>
           </listitem>
 

@@ -9419,6 +9428,18 @@
 
       </formalpara>
 
+      <note>
+        <para>
+          In this example, we show the single-threaded
+          <command>ndbd</command> being used for the data node
+          processes. However, you can also apply this example, if you
+          are using the multi-threaded <command>ndbmtd</command>
+          instead, by substituting <command>ndbmtd</command> for
+          <command>ndbd</command> wherever it appears in the steps that
+          follow.
+        </para>
+      </note>
+
       <formalpara>
 
         <title>Step 1: Update configuration file</title>

@@ -9490,6 +9511,7 @@
               <para>
                 Stop the management server using the management client
                 <literal>STOP</literal> command, as shown here:
+              </para>
 
 <programlisting>
 ndb_mgm&gt; <userinput>10 STOP</userinput>

@@ -9498,7 +9520,6 @@
 
 shell&gt;
 </programlisting>
-              </para>
             </listitem>
 
             <listitem>

@@ -9509,17 +9530,21 @@
                 we assume that <filename>config.ini</filename> is in the
                 same directory as the management server binary, but in
                 practice, you must supply the correct path to the
-                configuration file. If your shell&apos;s current
+                configuration file. You must also supply the
+                <option>--reload</option> or <option>--initial</option>
+                option so that the management server reads the new
+                configuration from the file rather than its
+                configuration cache. If your shell&apos;s current
                 directory is also the same as the directory where the
                 management server binary is located, then you can invoke
                 the management server as shown here:
+              </para>
 
 <programlisting>
-shell&gt; <userinput>ndb_mgmd -f config.ini</userinput>
+shell&gt; <userinput>ndb_mgmd -f config.ini --reload</userinput>
 2008-12-08 17:29:23 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.30 ndb-6.4.0-alpha
 2008-12-08 17:29:23 [MgmSrvr] INFO     -- Reading cluster configuration from 'config.ini'
 </programlisting>
-              </para>
             </listitem>
 
           </orderedlist>

@@ -9846,13 +9871,17 @@
               keyword, and no other keywords or identifiers follow
               <literal>REORGANIZE PARTITION</literal>.
             </para>
+
+            <para>
+              For more information, see <xref linkend="alter-table"/>.
+            </para>
           </note>
 
-          Also for each table, the <literal>ALTER ONLINE TABLE</literal>
-          statement should be followed by an <literal>OPTIMIZE
-          TABLE</literal> to reclaim wasted space. You can obtain a list
-          of all <literal>NDBCLUSTER</literal> tables using the
-          following query against the
+          Also, for each table, the <literal>ALTER ONLINE
+          TABLE</literal> statement should be followed by an
+          <literal>OPTIMIZE TABLE</literal> to reclaim wasted space. You
+          can obtain a list of all <literal>NDBCLUSTER</literal> tables
+          using the following query against the
           <literal>INFORMATION_SCHEMA.TABLES</literal> table:
 
 <programlisting>

@@ -9906,6 +9935,113 @@
 
       </formalpara>
 
+      <formalpara>
+
+        <title>Alternative procedure, without rolling restart</title>
+
+        <para>
+          It is possible to avoid the need for a rolling restart by
+          configuring the extra data nodes, but not starting them, when
+          first starting the cluster. This can be accomplished by using
+          the <literal>NodeGroup</literal> data node configuration
+          parameter in the <filename>config.ini</filename> file, as
+          shown here (note the section with bold text). We assume, as
+          before, that you wish to start with two data nodes &mdash;
+          nodes 1 and 2 &mdash; in one node group and later to expand
+          the cluster to four data nodes, by adding a second node group
+          consisting of nodes 3 and 4:
+
+<programlisting>
+[ndbd default]
+DataMemory = 100M
+IndexMemory = 100M
+NoOfReplicas = 2
+DataDir = /usr/local/mysql/var/mysql-cluster
+
+[ndbd]
+Id = 1
+HostName = 192.168.0.1
+
+[ndbd]
+Id = 2
+HostName = 192.168.0.2
+
+<emphasis role="bold">[ndbd]
+Id = 3
+HostName = 192.168.0.3
+NodeGroup = 65535
+
+[ndbd]
+Id = 4
+HostName = 192.168.0.4
+NodeGroup = 65535</emphasis>
+
+[mgm]
+HostName = 192.168.0.10
+Id = 10
+
+[api]
+Id=20
+HostName = 192.168.0.20
+
+[api]
+Id=21
+HostName = 192.168.0.21
+</programlisting>
+
+          In this case, you must perform the initial start of the
+          cluster using the <option>--nowait</option> option with
+          <command>ndbd</command> (or <command>ndbmtd</command>) for
+          each the data nodes that you wish to have online immediately,
+          so that the cluster will not wait for the remaining nodes to
+          start:
+
+<programlisting>
+shell&gt; <userinput>ndbd -c 192.168.0.10 --initial --nowait=3,4</userinput>
+</programlisting>
+
+          When you are ready to add the second nodegroup, you need only
+          perform the following additional steps:
+
+          <orderedlist>
+
+            <listitem>
+              <para>
+                Start data nodes 3 and 4, invoking the data node process
+                once for each new node:
+              </para>
+
+<programlisting>
+shell&gt; <userinput>ndbd -c 192.168.0.10 --initial</userinput>
+</programlisting>
+            </listitem>
+
+            <listitem>
+              <para>
+                Issue the appropriate <literal>CREATE
+                NODEGROUP</literal> command in the management client:
+              </para>
+
+<programlisting>
+ndb_mgm&gt; <userinput>CREATE NODEGROUP 3,4</userinput>
+</programlisting>
+            </listitem>
+
+            <listitem>
+              <para>
+                In the <command>mysql</command> client, issue
+                <literal>ALTER ONLINE TABLE ... REORGANIZE
+                PARTITION</literal> and <literal>OPTIMIZE
+                TABLE</literal> statements for each existing
+                <literal>NDBCLUSTER</literal> table.
+              </para>
+            </listitem>
+
+          </orderedlist>
+        </para>
+
+      </formalpara>
+
     </section>
 
   </section>


Modified: trunk/refman-5.1/mysql-cluster-process-management.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-process-management.xml	2009-01-11 23:18:25 UTC (rev 13095)
+++ trunk/refman-5.1/mysql-cluster-process-management.xml	2009-01-12 01:23:08 UTC (rev 13096)
Changed blocks: 3, Lines Added: 20, Lines Deleted: 1; 1690 bytes

@@ -661,7 +661,10 @@
             <para>
               You must set an appropriate value for the
               <literal>MaxNoOfExecutionThreads</literal> configuration
-              parameter in the <filename>config.ini</filename> file.
+              parameter in the <filename>config.ini</filename> file. If
+              you do not do so, <command>ndbmtd</command> runs in
+              single-threaded mode &mdash; that is, it behaves like
+              <command>ndbd</command>.
             </para>
           </listitem>
 

@@ -676,6 +679,11 @@
 
         </orderedlist>
 
+        <para>
+          These differences are discussed in more detail in the next few
+          paragraphs.
+        </para>
+
         <indexterm>
           <primary>ndbmtd</primary>
           <secondary>MaxNoOfExecutionThreads</secondary>

@@ -856,6 +864,17 @@
           <xref linkend="ndbd-error-messages"/>, for a listing of these.
         </para>
 
+        <note>
+          <para>
+            It is possible to use <command>ndbd</command> and
+            <command>ndbmtd</command> concurrently on different data
+            nodes in the same MySQL Cluster. However, such
+            configurations have not been tested extensively; thus, we
+            cannot not recommend doing so in a production setting at
+            this time.
+          </para>
+        </note>
+
       </refsection>
 
     </refentry>


Thread
svn commit - mysqldoc@docsrva: r13096 - trunk/refman-5.1jon12 Jan