2 node, data on same table differ

Comments

4 comments

  • Avatar
    Ashraf Sharif

    Hi,

    Could you show us the SHOW CREATE TABLE statement for that table? Did Galera nodes are in 'synced' state during that time?

    Regards,

    Ashraf

    0
    Comment actions Permalink
  • Avatar
    umarzuki

    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?

    0
    Comment actions Permalink
  • Avatar
    Ashraf Sharif

    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

    0
    Comment actions Permalink
  • Avatar
    umarzuki

    thanks Ashraf, I might need to find another way, probably besides galera.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk