ALTER CLUSTER ADD
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
In 6.0, 5.3:
Adds node(s) to an Xpand cluster with the
COORDINATE
option by default.
USAGE
Common Syntax:
ALTER CLUSTER ADD <node_name> [, <node_name> ...]
[COORDINATE | UNCOORDINATED]
Supported Syntax:
ALTER CLUSTER ADD <node_name> [, <node_name> ...]
{COORDINATE | UNCOORDINATED}
DETAILS
This statement can't be used to add Xpand nodes to a cluster in SkySQL.
Group Changes
In MariaDB Xpand 5.3 and 6, this statement causes a full group change by default.
In MariaDB Xpand 6.1, this statement adds nodes online with the following behavior:
"Late" nodes will move to the "normal" sub-state in the next full group change.
ALTER CLUSTER REFORM
can be used to initiate a group change to move nodes from "late" to "normal".A full group change occurs when the new cluster is more than twice the size of the old cluster. This is because the old cluster has less than a quorum of nodes for the new cluster.
If desired, use the
COORDINATE
option to ensure that there are no late nodes.
COORDINATE
| UNCOORDINATED
The COORDINATE
and UNCOORDINATED
options can be specified to control the group change behavior:
When the
COORDINATE
option is specified, Xpand waits for all nodes being added to join the cluster before forming the group. This results in a full group change.When the
UNCOORDINATED
option is specified, Xpand adds each node to the cluster as soon as it can, and performs an online group change when possible. Online group changes can only occur if the resulting cluster has fewer than half of the nodes in the "late" sub-state.
In MariaDB Xpand 6.0 and earlier, a full group change occurs by default, which matches the behavior of the COORDINATE
option.
In MariaDB Xpand 6.1, an online group change occurs by default when possible, which matches the behavior of the UNCOORDINATED
option.
The COORDINATE
option is recommended when forming a new cluster.
EXAMPLES
Scaling
This statement can't be used to add Xpand nodes to a cluster in SkySQL.