snippetsqlMinor
How to verify galera is synced
Viewed 0 times
verifygalerasyncedhow
Problem
I have been using mysql master:master replication and was always able to check the status of replication using this command:
I was able to see this in the show slave status command:
The seconds_behind_master always let me know if I was behind on one of my servers.
I am not using galera and am not sure how to verify if everything is up to date.
I have come across this article "Monitoring Cluster Status"
I realize I can use this command to see how many nodes are in the cluster:
But I am not sure if this command if good enough to tell whether or not they are exactly up to date:
This command currently show synced but I cannot tell if this is the best way to tell if I am good to go.
mysql > show slave status\GI was able to see this in the show slave status command:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Seconds_Behind_Master: 0The seconds_behind_master always let me know if I was behind on one of my servers.
I am not using galera and am not sure how to verify if everything is up to date.
I have come across this article "Monitoring Cluster Status"
I realize I can use this command to see how many nodes are in the cluster:
SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';But I am not sure if this command if good enough to tell whether or not they are exactly up to date:
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';This command currently show synced but I cannot tell if this is the best way to tell if I am good to go.
Solution
If
There's no
wsrep_local_state_comment, wsrep_ready, and wsrep_connected show the correct values, then that particular node is good. There's no
Seconds_Behind_Master equivalent, because Galera is synchronous -- a healthy node can't be lagging, by definition and by design... a slow node slows down all the others, it doesn't lag behind them.Context
StackExchange Database Administrators Q#132769, answer score: 5
Revisions (0)
No revisions yet.