wsrep_cluster_status

Overview

Component type, primary or non-primary, to which the node is connected. Node remains non-operational until it connects to the Primary Component.

See also: Status Variables for MariaDB Enterprise Server 23.08, in 23.07 ES, in 10.6 ES, in 10.5 ES, in 10.4 ES, in 10.3 ES, in 10.2 ES, in 10.6 CS, in 10.5 CS, in 10.4 CS, in 10.3 CS, and in 10.2 CS

USAGE

DETAILS

When a Cluster Node starts, it attempts to establish network connectivity with the other nodes specified by the wsrep_cluster_address system variable. As nodes connect, they form components. Once they establish connectivity with the Primary Component and synchronize databases, they become operational.

This status variable indicates the component to which the node currently belongs.

Component

Description

Primary

Indicates the node is connected to the Primary Component.

Non-Primary

Indicates the node is not connected to the Primary Component.

Cluster Nodes that belong to non-primary components are non-operational and raise a ER_UNKNOWN_COM_ERROR to SQL queries.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

Use the SHOW STATUS statement to view the current status:

SHOW STATUS LIKE "wsrep_cluster_status";
+----------------------+---------+
| Variable_name        | Value   |
+----------------------+---------+
| wsrep_cluster_status | Primary |
+----------------------+---------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

Error for Non-operational Components

When the Cluster Node belongs to a non-operational component, it raises a ER_UNKNOWN_COM_ERROR error with the following error message:

WSREP has not yet prepared node for application use

For example:

SHOW STATUS LIKE 'wsrep_cluster_status';
+----------------------+-------------+
| Variable_name        | Value       |
+----------------------+-------------+
| wsrep_cluster_status | Non-Primary |
+----------------------+-------------+
SELECT * FROM test.t1;
ERROR 1047 (08S01): WSREP has not yet prepared node for application use

This indicates that the Cluster Node does not have network connectivity with the Primary Component.

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.08 Enterprise

  • Present starting in MariaDB Enterprise Server 23.08.0.

23.07 Enterprise

  • Present starting in MariaDB Enterprise Server 23.07.0.

10.6 Enterprise

  • Present starting in MariaDB Enterprise Server 10.6.4-1.

10.6 Community

  • Present starting in MariaDB Community Server 10.6.0.

10.5 Enterprise

  • Present starting in MariaDB Enterprise Server 10.5.3-1.

10.5 Community

  • Present starting in MariaDB Community Server 10.5.0.

10.4 Enterprise

  • Present starting in MariaDB Enterprise Server 10.4.6-1.

10.4 Community

  • Present starting in MariaDB Community Server 10.4.0.

10.3 Enterprise

  • Present starting in MariaDB Enterprise Server 10.3.16-1.

10.3 Community

  • Present starting in MariaDB Community Server 10.3.0.

10.2 Enterprise

  • Present starting in MariaDB Enterprise Server 10.2.25-1.

10.2 Community

  • Present starting in MariaDB Community Server 10.2.0.

EXTERNAL REFERENCES