AGGREGATOR SET AS MASTER
MemSQL Helios does not support this command.
Promote a child aggregator to master aggregator.
AGGREGATOR SET AS MASTER;
AGGREGATOR SET AS MASTER command is used to convert a child aggregator node to a master aggregator node. Follow these steps to set a child aggregator as the master aggregator:
- Stop any DDL queries and writes to reference tables.
- Confirm that the cluster and reference databases (if any) are in sync between the master aggregator and child aggregator to be promoted. To check the position of databases, create a connection to the MemSQL node and run the SHOW DATABASES EXTENDED command.
- Disable detection of leaf failures and trigger failovers on the child aggregator. Set
leaf_failure_detectionvariable on the target child aggregator to off. Perform this step from the master aggregator. If the current master aggregator is unresponsive, skip this step.
- Stop the master aggregator using the
memsql-ops memsql-stop <master_aggregator_ID>or
sdb-admin stop-node --memsql-id <master_aggregator_ID>command. Make sure the master aggregator is offline before proceeding.
- Clear the DNS cache on all the nodes in the cluster using the
- Promote the child aggregator to the master aggregator. Run the
AGGREGATOR SET AS MASTERcommand on the target child aggregator. Execute the
SELECT @@master_aggregatorquery. This query should return self.
- Enable leaf failure detection on the master aggregator. Set
- Remove the old master aggregator from the cluster using REMOVE AGGREGATOR.
- Delete the old master aggregator. Run the memsql-ops memsql-delete <node_ID> or sdb-admin delete-node <node_ID> command.
This command must be run on a child aggregator node (see Node Requirements for MemSQL Commands). If this command is run while your cluster has a master aggregator, it will return an error.
AGGREGATOR SET AS MASTER; Query OK, 1 row affected (1 min 22.41 sec)