mariadb, is this kind of increment offset reaction consider normal?

人走茶凉 提交于 2020-01-06 05:57:11

问题


I posted a similar question a bit earlier but I was a bit confused because of the settings already set and by reading this http://mariadb.org/auto-increments-in-galera/ I totally understand and corrected the settings but from what I read the output of the auto increment id will be like

both nodes are increment of 2

node 1 with offset 1 1,3,5,7

node 2 with offset 2 2,4,6,8

but when I create new rows...this happens

create with node 1, node 1, node 2 would give me 1,3,4 it wouldn't give me 2

create with node 1, node 2, node 1, node 2 would give me 1,2,3,4

I am just wondering if this kind of reaction is considered as normal or there is something I am missing that I should correct?

Thanks in advance


回答1:


Galera is designed for both nearly-synchronous replication and speed. There are tradeoffs. You have uncovered one of them. I suspect a similar "gap" can be found in the old dual-Master replication.

Live with it!

AUTO_INCREMENT values are guaranteed to be unique. Period. Full stop. There are a lot of other attributes that you might like, but you cannot assume them.

Another doc: https://mariadb.com/kb/en/library/tips-on-converting-to-galera/#auto_increment



来源:https://stackoverflow.com/questions/48102516/mariadb-is-this-kind-of-increment-offset-reaction-consider-normal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!