mariadb,这种增量补偿反应是否正常? [英] mariadb, is this kind of increment offset reaction consider normal?

查看:96
本文介绍了mariadb,这种增量补偿反应是否正常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我早些时候发布了一个类似的问题,但是由于已经设置了设置,并且阅读了此 http://mariadb.org/auto-increments-in-galera/我完全理解并更正了设置,但是从我阅读的内容中,自动增量ID的输出将是

两个节点的增量均为2

节点1的偏移量为1 1,3,5,7

具有偏移量2的节点2 2,4,6,8

但是当我创建新行时...会发生

使用节点1,节点1,节点2创建将给我 1,3,4 它不会给我2

使用节点1,节点2,节点1,节点2创建将给我 1,2,3,4

我只是想知道这种反应是否被认为是正常的,或者我缺少一些我应该纠正的东西?

预先感谢

解决方案

Galera专为几乎同步的复制速度而设计.需要权衡.您已发现其中之一.我怀疑在旧的双主复制中可以找到相似的间隙".

与它同住!

AUTO_INCREMENT的值保证是唯一的.时期.句号您可能会喜欢很多其他属性,但是您无法假定它们.

另一个文档: https://mariadb .com/kb/en/library/tips-on-converting-to-galera/#auto_increment

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

解决方案

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

这篇关于mariadb,这种增量补偿反应是否正常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆