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 in 10.6 ES, in 10.5 ES, and in 10.4 ES

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.

EXAMPLES

Use the SHOW STATUS statement to view the current status:

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

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.

CHANGE HISTORY

Release Series

History

10.6 Enterprise

  • Present starting in MariaDB Enterprise Server 10.6.4-1.

10.5 Enterprise

  • Present starting in MariaDB Enterprise Server 10.5.3-1.

10.4 Enterprise

  • Present starting in MariaDB Enterprise Server 10.4.6-1.

EXTERNAL REFERENCES