AGGREGATOR SET AS MASTER
On this page
Promote a child aggregator to master aggregator.
Syntax
AGGREGATOR SET AS MASTER;
Remarks
-
This command should only be used in cases where the master aggregator is permanently lost.
The command PROMOTE AGGREGATOR … TO MASTER is required for all other use cases that require the promotion of a child aggregator to master. -
This command must be run on the child aggregator node to be promoted to master (see Node Requirements for SingleStore Commands ).
If this command is run while your cluster has an online master aggregator, it will return an error. -
For version 7.
1 and older, see Previous Versions. -
This command causes implicit commits.
Refer to COMMIT for more information. -
See the Permission Matrix for the required permission.
Example
AGGREGATOR SET AS MASTER;
Query OK, 1 row affected (1 min 22.41 sec)
Related Topics
Previous Versions
In previous versions of SingleStore, AGGREGATOR SET AS MASTER
required the following procedure:
-
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_
variable on the target child aggregator to off.failure_ detection 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_
oraggregator_ ID> sdb-admin stop-node --memsql-id <master_
command.aggregator_ ID> Make sure the master aggregator is offline before proceeding. -
Clear the DNS cache on all the nodes in the cluster using the
FLUSH HOSTS
command. -
Promote the child aggregator to the master aggregator.
Run the AGGREGATOR SET AS MASTER
command on the target child aggregator.Execute the SELECT @@master_
query.aggregator This query should return self
. -
Enable leaf failure detection on the master aggregator.
Set leaf_
variable tofailure_ detection ON
. -
Remove the old master aggregator from the cluster using
REMOVE AGGREGATOR
. -
Delete the old master aggregator.
Run the memsql-ops memsql-delete <node_
orID> sdb-admin delete-node <node_
command.ID>
Last modified: July 31, 2023