Outdated Version
You are viewing an older version of this section. View current production version.
REMOVE LEAF
Removes a leaf node from a cluster and rebalances its partitions into the rest of the cluster.
Syntax
REMOVE LEAF 'host':port [FORCE]
Remarks
- Port (default 3306) is optional.
- If the leaf does not have a pair, MemSQL will rebalance its partitions onto the remaining leaves before removing it. After this rebalance process is over, the partition databases that were moved are no longer present on the node.
- You must use the
ADD LEAF
command if you want to reintroduce the removed leaf into the system. - This command must be run on the master aggregator node (see Node Requirements for MemSQL Commands ).
- The
FORCE
flag disables the rebalancing behavior ofREMOVE LEAF
. This behavior is designed to keep the database online while you remove a leaf from the system. However, if you are performing maintenance and want to quickly remove a leaf node without keeping the database online, then use theFORCE
flag to disable automatic rebalancing. - If MemSQL Ops is not enabled for manual cluster control, then a
REMOVE LEAF
can result in the leaf being added back without user intervention.
Example
memsql> REMOVE LEAF '192.168.1.110':3306;
Related Topics