Outdated Version
You are viewing an older version of this section. View current production version.
ADD LEAF
Info
SingleStore Managed Service does not support this command.
Add a leaf node to a cluster.
Syntax
ADD LEAF user[:'password']@'host'[:port] [INTO GROUP {1|2}]
Remarks
user
specifies the user other nodes in the cluster will use to connect to the leaf. This user should have super privileges as it will be used to run all queries and cluster management commands on the leaf.password
(default “") is optional. The password needed to log in to the leaf. This password can’t be changed once the leaf is added without first removing the leaf.port
(default 3306) is optional.[INTO GROUP {1|2}]
specifies the availability group, if applicable, to which you want to add the leaf. See Managing High Availability for more information. If you do not explicitly specify a group, SingleStore DB will automatically add the leaf into the smallest group less than or equal toredundancy_level
.- If you run
ADD LEAF
on a host/port pair that already exists inSHOW LEAVES
, SingleStore DB will return an error. - This command must be run on the master aggregator node (see Node Requirements for SingleStore DB Commands ).
ADD LEAF
doesn’t automatically runREBALANCE PARTITIONS
to move new data onto the leaf.REBALANCE
needs to be run manually to move data. If you plan to add multiple leaves its most efficient to add them all first and run a singleREBALANCE
to move data onto the new leaves.- If the leaf was previously a part of the cluster any partitions still on the leaf when its added will be reattached as part of
ADD LEAF
.
Example
ADD LEAF 'root'@'192.168.1.110':3306;
Query OK, 1 row affected (0.00 sec)
Related Topics