Error code:
mysql > drop database zz ;
ERROR one thousand and forty-seven ( 08S01 ) : WSREP has not yet prepared node for application use
Cause analysis:
zero
one
two
three
four
five
six
seven
eight
nine
mysql > show status like '%wsrep_cluster%' ;
+--------------------------+--------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------+
| wsrep_cluster_conf_id | 18446744073709551615 |
| wsrep_cluster_size | two |
| wsrep_cluster_state_uuid | e35b3ad5 - 788e - 11e8 - eight thousand seven hundred and sixty-seven - 6750dfa85f8e |
| wsrep_cluster_status | non - Primary |
+--------------------------+--------------------------------------+
four rows in set ( zero point zero one sec )
PXC (Percona Xtradb Cluster) In order to ensure data consistency, only less than 50% of the nodes are allowed to leave the cluster. When the number of nodes is less than 50%, the sub cluster will enter the non master mode and refuse to provide external services. This will cause the cluster to temporarily fail to provide external services Repair method:
zero
one
two
three
four
five
six
seven
eight
nine
ten
mysql > SET GLOBAL wsrep_provider_options = 'pc.bootstrap=true' ;
mysql > show status like '%wsrep_cluster%' ;
+--------------------------+--------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------+
| wsrep_cluster_conf_id | fifteen |
| wsrep_cluster_size | two |
| wsrep_cluster_state_uuid | e35b3ad5 - 788e - 11e8 - eight thousand seven hundred and sixty-seven - 6750dfa85f8e |
| wsrep_cluster_status | Primary |
+--------------------------+--------------------------------------+
To view server best commits:
zero
one
two
three
four
five
six
mysql > show status like 'wsrep_last_committed' ;
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| wsrep_last_committed | three |
+----------------------+-------+
one row in set ( zero sec )
SourceByrd's Weblog- https://note.t4x.org/error/wsrep-has-not-yet-prepared-node-for-application-use/
reference resources: 1: https://stackoverflow.com/questions/40653238/mariadb-galera-error-when-a-node-shutdown-error-1047-wsrep-has-not-yet-prepare 2: https://www.j4ml.com/t/37207 SourceByrd's Weblog- https://note.t4x.org/error/wsrep-has-not-yet-prepared-node-for-application-use/
SourceByrd's Weblog- https://note.t4x.org/error/wsrep-has-not-yet-prepared-node-for-application-use/