You are viewing an older version of this section. View current production version.
Master Aggregator
In a MemSQL cluster, the master aggregator
is a specialized aggregator responsible for cluster monitoring and failover. The master aggregator orchestrates basic cluster operations and all DDL operations. Each MemSQL cluster has one master aggregator node.
Commands that Must Run on a Master Aggregator
You must run queries, such the following commands, through the master aggregator:
- CREATE DATABASE
- DROP DATABASE
- CREATE TABLE
- DROP TABLE
- ALTER TABLE
- ADD LEAF
- REMOVE LEAF
- REBALANCE PARTITIONS
Master Aggregator Startup
To manually specify a master aggregator in a MemSQL cluster, pick a node in the cluster that will serve as the master aggregator and append the line master-aggregator
(with no arguments) to the end of its memsql.cnf
, then start the server.
If you’re running the MemSQL binary directly, start the master aggregator with the following command:
$ ./memsqld --master-aggregator
Recovering from a Master Aggregator Failure
If the master aggregator fails, the cluster remains online and functional. You can continue to run DML operations through any remaining aggregator. Only DDL operations and auto-failover are suspended until you restore the master aggregator. If you haven’t lost the master’s data directory, simply restart it and communication between it and the other nodes in the cluster will be re-established automatically. Otherwise, MemSQL supports promoting one of the remaining aggregators as the new master. To do this, run the AGGREGATOR SET AS MASTER command on the child aggregator you want to promote to master.