A leaf is a MemSQL server consisting of multiple partitions. Each partition is just a database on that server. For example, if you have a database named test and run SHOW DATABASES on a leaf, you will see names resembling test_5 (this would be partition 5 for database test).

Master and replica partitions

A partition is either a master or a replica. Leaves as a whole are not masters or replicas (this distinction is made at the partition level).


MemSQL will create replica partitions only in redundancy-2.

Partition States

If you run SHOW DATABASES EXTENDED on a leaf, you will see that partition databases are in one of three states:

State Description
online State for master partitions.
replicating State for replica partitions, which arereplicating from the corresponding master partition over the network.
pending State for partitions which have just recovered from disk and are waiting to get attached back into the cluster. The state will change to online or replicating once the partition is attached by the master aggregator (see Database States).

Partition Commands