Insert Record in the node with wsrep_on=OFF. Cannot Sync after Rejoin the Cluster when wsrep_on=ON
3-node cluster in MariaDB 10.3.10. Restart node 2 with wsrep_on=OFF in server.cnf
Insert a new record into a table in node 2.
Insert a new record into the same table in node 1. The new record was sync to node 3. Since node 2 is out of the cluster, not sync.
Change wsrep_on=ON in server.cnf for node 2. Restart MariaDB by 'systemctl restart mysql' on node 2.
Node 2 joined back the cluster successfully. Then, new record inserted in node 1 was sync to node 2. But the new record in node 2 did not sync to node 1 and 3.
Is it normal?
When a node was off the cluster (wsrep_on=OFF) and "manipulated", i.e. insert/delete/update/..., how to make it sync to other nodes again after rejoining the cluster?
-
My method to sync back the previously detached node 2 is...
(1) Detach node 2 from cluster
(2) Restore the initial db backup (the original image after installing MariaDB) to node 2
(3) Join back node 2 to cluster
(4) Let other nodes sync the latest image to node 2
Is it the only way to sync back the previously detached node to current image?
-
Hello,
If you set wsrep_on=OFF on a node and restart it means you are taking the node means you are taking the cluster out of the cluster. Which in turn means that any changes made to this node will not be reflected to other nodes once it rejoings them. Meanwhile changes to the other 2 nodes will be replicated to the third node node once wsrep_on is set to ON and this node is restarted. For more details please check:
http://galeracluster.com/documentation-webpages/mysqlwsrepoptions.html#wsrep-on
http://galeracluster.com/documentation-webpages/architecture.htmlThanks
Please sign in to leave a comment.
Comments
3 comments