Skip to main content

REMOVE LEAF

  • Removes a leaf node from a cluster without deleting its data.

  • This command rebalances the leaf node’s partitions into the remaining cluster, removes the specified leaf node from the Master Aggregator, and the leaf node will be removed from the SHOW LEAVES command.

  • While the cluster will no longer know about this leaf node, Toolbox will still know that memsqlctl recognizes that there is a running memsql process which is now in the unknown state.

  • A leaf node that has been removed can be added back to the cluster, without any loss of data, by using the ADD LEAF command.

  • This command causes implicit commits. See COMMIT for more information.

  • Refer to sdb-admin delete-node to delete a leaf node and its data.

  • See the Permission Matrix for the required permission.

Syntax

REMOVE LEAF 'host':port [FORCE]

Remarks

  • Port value is 3306.

  • If the leaf does not have a pair, SingleStoreDB 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 can be run on the master aggregator node, or a child aggregator node (see Node Requirements for SingleStoreDB Commands ).

  • The FORCE flag disables the rebalancing behavior of REMOVE 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 the FORCE 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

REMOVE LEAF '192.168.1.110':3306;

Related Topics