wsrep_cluster_status
This page is part of MariaDB's Enterprise Documentation.
The parent of this page is: Status Variables
Topics on this page:
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.6 CS, in 10.5 ES, in 10.5 CS, in 10.4 ES, in 10.4 CS, in 10.3 ES, in 10.3 CS, in 10.2 ES, and in 10.2 CS
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 |
---|---|
| Indicates the node is connected to the Primary Component. |
| 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 |
|
10.6 Community |
|
10.5 Enterprise |
|
10.5 Community |
|
10.4 Enterprise |
|
10.4 Community |
|
10.3 Enterprise |
|
10.3 Community |
|
10.2 Enterprise |
|
10.2 Community |
|
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.
Information specific to MariaDB SkySQL can be found on the wsrep_cluster_status page in the SkySQL Documentation.