<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-online-add-node-remarks">
      </a>
      25.6.7.1 Adding NDB Cluster Data Nodes Online: General Issues
     </h4>
    </div>
   </div>
  </div>
  <p>
   This section provides general information about the behavior of
        and current limitations in adding NDB Cluster nodes online.
  </p>
  <p>
   <b>
    Redistribution of Data.
   </b>
   The ability to add new nodes online includes a means to
          reorganize
   <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
    <code class="literal">
     NDBCLUSTER
    </code>
   </a>
   table data
          and indexes so that they are distributed across all data
          nodes, including the new ones, by means of the
   <a class="link" href="alter-table-partition-operations.html" title="15.1.9.1 ALTER TABLE Partition Operations">
    <code class="literal">
     ALTER
          TABLE ... REORGANIZE PARTITION
    </code>
   </a>
   statement. Table
          reorganization of both in-memory and Disk Data tables is
          supported. This redistribution does not currently include
          unique indexes (only ordered indexes are redistributed).
  </p>
  <p>
   The redistribution for
   <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
    <code class="literal">
     NDBCLUSTER
    </code>
   </a>
   tables already existing before the new data nodes were added is
        not automatic, but can be accomplished using simple SQL
        statements in
   <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
    <span class="command">
     <strong>
      mysql
     </strong>
    </span>
   </a>
   or another MySQL client
        application. However, all data and indexes added to tables
        created after a new node group has been added are distributed
        automatically among all cluster data nodes, including those
        added as part of the new node group.
  </p>
  <p>
   <b>
    Partial starts.
   </b>
   It is possible to add a new node group without all of the new
          data nodes being started. It is also possible to add a new
          node group to a degraded cluster—that is, a cluster that
          is only partially started, or where one or more data nodes are
          not running. In the latter case, the cluster must have enough
          nodes running to be viable before the new node group can be
          added.
  </p>
  <p>
   <b>
    Effects on ongoing operations.
   </b>
   Normal DML operations using NDB Cluster data are not prevented
          by the creation or addition of a new node group, or by table
          reorganization. However, it is not possible to perform DDL
          concurrently with table reorganization—that is, no other
          DDL statements can be issued while an
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE ...
          REORGANIZE PARTITION
    </code>
   </a>
   statement is executing. In
          addition, during the execution of
   <code class="literal">
    ALTER TABLE ...
          REORGANIZE PARTITION
   </code>
   (or the execution of any other
          DDL statement), it is not possible to restart cluster data
          nodes.
  </p>
  <p>
   <b>
    Failure handling.
   </b>
   Failures of data nodes during node group creation and table
          reorganization are handled as shown in the following table:
  </p>
  <div class="table">
   <a name="idm46045092454944">
   </a>
   <p class="title">
    <b>
     Table 25.38 Data node failure handling during node group creation and
table reorganization
    </b>
   </p>
   <div class="table-contents">
    <table>
     <colgroup>
      <col style="width: 25%"/>
      <col style="width: 25%"/>
      <col style="width: 25%"/>
      <col style="width: 25%"/>
     </colgroup>
     <thead>
      <tr>
       <th scope="col">
        Failure during
       </th>
       <th scope="col">
        Failure in
        <span class="quote">
         “
         <span class="quote">
          Old
         </span>
         ”
        </span>
        data node
       </th>
       <th scope="col">
        Failure in
        <span class="quote">
         “
         <span class="quote">
          New
         </span>
         ”
        </span>
        data node
       </th>
       <th scope="col">
        System Failure
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <th scope="row">
        Node group creation
       </th>
       <td>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: disc; ">
          <li class="listitem">
           <p>
            <b>
             If a node other than the master fails:
            </b>
            The creation of the node group is always rolled
                      forward.
           </p>
          </li>
          <li class="listitem">
           <p>
            <b>
             If the master fails:
            </b>
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: circle; ">
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has been reached:
               </b>
               The creation of the node group is rolled
                          forward.
              </p>
             </li>
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has not yet been reached.
               </b>
               The creation of the node group is rolled back
              </p>
             </li>
            </ul>
           </div>
          </li>
         </ul>
        </div>
       </td>
       <td>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: disc; ">
          <li class="listitem">
           <p>
            <b>
             If a node other than the master fails:
            </b>
            The creation of the node group is always rolled
                      forward.
           </p>
          </li>
          <li class="listitem">
           <p>
            <b>
             If the master fails:
            </b>
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: circle; ">
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has been reached:
               </b>
               The creation of the node group is rolled
                          forward.
              </p>
             </li>
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has not yet been reached.
               </b>
               The creation of the node group is rolled back
              </p>
             </li>
            </ul>
           </div>
          </li>
         </ul>
        </div>
       </td>
       <td>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: disc; ">
          <li class="listitem">
           <p>
            <b>
             If the execution of CREATE NODEGROUP has reached the internal commit
                      point:
            </b>
            When restarted, the cluster includes the new node
                      group. Otherwise it without.
           </p>
          </li>
          <li class="listitem">
           <p>
            <b>
             If the execution of CREATE NODEGROUP has not yet reached the internal
                      commit point:
            </b>
            When restarted, the cluster does not include the
                      new node group.
           </p>
          </li>
         </ul>
        </div>
       </td>
      </tr>
      <tr>
       <th scope="row">
        Table reorganization
       </th>
       <td>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: disc; ">
          <li class="listitem">
           <p>
            <b>
             If a node other than the master fails:
            </b>
            The table reorganization is always rolled forward.
           </p>
          </li>
          <li class="listitem">
           <p>
            <b>
             If the master fails:
            </b>
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: circle; ">
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has been reached:
               </b>
               The table reorganization is rolled forward.
              </p>
             </li>
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has not yet been reached.
               </b>
               The table reorganization is rolled back.
              </p>
             </li>
            </ul>
           </div>
          </li>
         </ul>
        </div>
       </td>
       <td>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: disc; ">
          <li class="listitem">
           <p>
            <b>
             If a node other than the master fails:
            </b>
            The table reorganization is always rolled forward.
           </p>
          </li>
          <li class="listitem">
           <p>
            <b>
             If the master fails:
            </b>
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: circle; ">
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has been reached:
               </b>
               The table reorganization is rolled forward.
              </p>
             </li>
             <li class="listitem">
              <p>
               <b>
                If the internal commit point has not yet been reached.
               </b>
               The table reorganization is rolled back.
              </p>
             </li>
            </ul>
           </div>
          </li>
         </ul>
        </div>
       </td>
       <td>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: disc; ">
          <li class="listitem">
           <p>
            <b>
             If the execution of an ALTER TABLE ... REORGANIZE PARTITION statement
                      has reached the internal commit point:
            </b>
            When the cluster is restarted, the data and
                      indexes belonging to
            <em class="replaceable">
             <code>
              table
             </code>
            </em>
            are distributed
                      using the
            <span class="quote">
             “
             <span class="quote">
              new
             </span>
             ”
            </span>
            data nodes.
           </p>
          </li>
          <li class="listitem">
           <p>
            <b>
             If the execution of an ALTER TABLE ... REORGANIZE PARTITION statement
                      has not yet reached the internal commit point:
            </b>
            When the cluster is restarted, the data and
                      indexes belonging to
            <em class="replaceable">
             <code>
              table
             </code>
            </em>
            are distributed
                      using only the
            <span class="quote">
             “
             <span class="quote">
              old
             </span>
             ”
            </span>
            data nodes.
           </p>
          </li>
         </ul>
        </div>
       </td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <br class="table-break"/>
  <p>
   <b>
    Dropping node groups.
   </b>
   The
   <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
    <span class="command">
     <strong>
      ndb_mgm
     </strong>
    </span>
   </a>
   client supports a
   <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-drop-nodegroup">
    <code class="literal">
     DROP NODEGROUP
    </code>
   </a>
   command,
          but it is possible to drop a node group only when no data
          nodes in the node group contain any data. Since there is
          currently no way to
   <span class="quote">
    “
    <span class="quote">
     empty
    </span>
    ”
   </span>
   a specific data node
          or node group, this command works only the following two
          cases:
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      After issuing
      <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-create-nodegroup">
       <code class="literal">
        CREATE
            NODEGROUP
       </code>
      </a>
      in the
      <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
       <span class="command">
        <strong>
         ndb_mgm
        </strong>
       </span>
      </a>
      client, but before issuing any
      <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
       <code class="literal">
        ALTER TABLE ...
            REORGANIZE PARTITION
       </code>
      </a>
      statements in the
      <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
       <span class="command">
        <strong>
         mysql
        </strong>
       </span>
      </a>
      client.
     </p>
    </li>
    <li class="listitem">
     <p>
      After dropping all
      <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
       <code class="literal">
        NDBCLUSTER
       </code>
      </a>
      tables using
      <a class="link" href="drop-table.html" title="15.1.32 DROP TABLE Statement">
       <code class="literal">
        DROP TABLE
       </code>
      </a>
      .
     </p>
     <p>
      <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
       <code class="literal">
        TRUNCATE TABLE
       </code>
      </a>
      does not work
            for this purpose because the data nodes continue to store
            the table definitions.
     </p>
    </li>
   </ol>
  </div>
 </div>
 <br/>
</div>
