Not the answer you need?
Register and ask your own question!

Galera synchronization broken

herrneissherrneiss EntrantCurrent User Role Beginner
Hi, I'm new to percona cluster and I need advice about shutting down of cluster nodes.
I have 2 nodes and this scenario:

1. Both servers A and B are running in cluster.
2. Server A performs normal shutdown. The seqno in grastate.dat is 1.
3. There are some writes on server B.
4. Server B performs normal shutdown. The seqno in grastate.dat is 2.
5. Server A is starting as a first node of the cluster.
6. There are some writes on server A.
7. Server B starts and joins the cluster. At this moment, the changes on each node aren't replicated to the other node and so data aren't consistent, although cluster doesn't log any error and is normally running.

I consider this scenario, because my customer wants to run cluster nodes as virtual guests in Microsoft Hyper-V on Windows, so I must suppose that he will perform updates and restarts on the host machine, and so the cluster nodes will be restarted without my control. I can add the third node to the cluster (propably Galera Arbitrator) to the cluster, but in will run on the same host as the node A, and so it isn't a solution.
Can you please advice me, how to avoid inconsistent data in this scenario?
Thanks and sorry for my English.
Thomas

Comments

  • jriverajrivera Percona Support Engineer Percona Staff Role
    Make sure to bootstrap the cluster with the node with the most advanced state ID, in your case Server B and not Server A. Once Server A rejoins, it will check if it needs to do an IST or SST. But afaik it is not recommended to start the node that does not have the most advanced state ID.

    http://galeracluster.com/documentation-webpages/restartingcluster.html
  • herrneissherrneiss Entrant Current User Role Beginner
    Thank you for your reply.
    Yes, I know I should start the node with the most advanced state. But I'm afraid, that my customer will perform restarts of host servers and so I don't have control over restarts of cluster nodes. So I have created a service (/etc/init.d script) to automatically start the cluster if no node is running. I know, that the scenario in my last post isn't very probably, but it's theoretically possible. I wonder, if there is some configuration option to force check the consistency of the nodes while rejoining with the same seqno in grastate.dat.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.