2 node, data on same table differ
I created table staff on database company with 6 staff on node 1
but I can only see staff 1, staff 3, staff 5 on node 1
staff 2, staff 4 and staff 6 on node 2
table is using innodb engine
I'm using galera config script version 3.5.0 on ubuntu 14.04 amd64
This is a 2 nodes with a garbd on cluster control.
-
I found out that this is an auto increment issue which has stated at https://mariadb.com/kb/en/mariadb/mariadb-galera-cluster-known-limitations/
Any workaround?
-
Hi,
As stated there, this is a limitation in Galera cluster and you can't rely on sequential auto-increment value, details on this explained in this post: http://codership.blogspot.com/2009/02/managing-auto-increments-with-multi.html . If you have 3 nodes, the auto increment values will be:
Node A: 1, 4, 7, 10..
Node B: 2, 5, 8, 11..
Node C: 3, 6, 9, 12..Variable wsrep_auto_increment_control is to define if the automatic auto increment controlling is enabled or not. With auto increment controlling enabled, cluster will take fully care of setting the increment and offset variables and this will guarantee no conflicts. If auto increment controlling is disabled, system will behave as default MySQL, and user must specify increment and offset globally or by session to suitable values to avoid conflicts.
Regards,
Ashraf
Please sign in to leave a comment.
Comments
4 comments