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

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

问题描述

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

两个节点的增量为 2

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

节点 2,偏移量 22,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天全站免登陆