Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query optimization, and usability that you won’t want to miss.

ADD AGGREGATOR

Info

SingleStore Managed Service does not support this command.

Adds a new child aggregator to a cluster.

Syntax

ADD AGGREGATOR user[:'password']@'host'[:port] ;

Remarks

This command can be run on the master aggregator node, or a child aggregator node (see Node Requirements for SingleStore DB Commands ).

The specified user account must have full permissions on the node to execute this command, namely the cluster privilege. For more information, see Permissions Matrix. The user account will be used by the master aggregator to initially log in to the node. Unlike for ADD LEAF, the specified user won’t be used for any internal cluster communication after the command returns.

Example

The following example demonstrates how to add a child aggregator to a cluster. Note that the client is connected to the master aggregator:

SHOW AGGREGATORS;
+-----------+------+--------+--------------------+------------------------------+-------------------+
| Host      | Port | State  | Opened_Connections | Average_Roundtrip_Latency_ms | Master_Aggregator |
+-----------+------+--------+--------------------+------------------------------+-------------------+
| 10.0.2.15 | 3306 | online |                  1 |                         NULL |                 1 |
+-----------+------+--------+--------------------+------------------------------+-------------------+
1 row in set (0.00 sec)

ADD AGGREGATOR root@'10.0.2.16':3306;
Query OK, 0 rows affected (1.49 sec)

SHOW AGGREGATORS;
+-----------+------+--------+--------------------+------------------------------+-------------------+
| Host      | Port | State  | Opened_Connections | Average_Roundtrip_Latency_ms | Master_Aggregator |
+-----------+------+--------+--------------------+------------------------------+-------------------+
| 10.0.2.15 | 3306 | online |                  1 |                         NULL |                 1 |
| 10.0.2.16 | 3306 | online |                  0 |                        0.218 |                 0 |
+-----------+------+--------+--------------------+------------------------------+-------------------+
2 rows in set (0.00 sec)