Outdated Version

You are viewing an older version of this section. View current production version.

ADD LEAF

Add a leaf node to a cluster.

ADD LEAF user[:'password']@'host'[:port] [INTO GROUP {1|2}]

Notes

  • password (default “") is optional.
  • 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, MemSQL will automatically add the leaf into the smallest group less than or equal to redundancy_level.
  • If you run ADD LEAF on a host/port pair that already exists in SHOW LEAVES, MemSQL will return an error.
  • This command must be run on the master aggregator node (see Node Requirements for MemSQL Commands ).
  • ADD LEAF doesn’t automatically run REBALANCE 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 single REBALANCE to move data onto the new leaves.
  • If the leaf was previously apart of the cluster any partitions still on the leaf when its added will be reattached as part of ADD LEAF.

Example

memsql> ADD LEAF 'root'@'192.168.1.110':3306;
Query OK, 1 row affected (0.00 sec)