暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
MGR环境insert into select报错引发的思考。
840
3页
1次
2020-07-10
5墨值下载
今天在 MGR 环境下,造一个表数据,使用语句如下,报错如下。
且集群解散了,我们来看看是什么原因。
报错内容:
语句:一般不建议这么干
INSERT INTO demo.mq_receive_history(create_time, update_time, del_flag, code, gid,
uid, msg_id, receive_time, data, receive_message, error_code, error_msg, is_ui_run,
is_system_login, code_run_id)
select create_time, update_time, del_flag, code, gid, uid, msg_id, receive_time, data,
receive_message, error_code, error_msg, is_ui_run, is_system_login, code_run_id from
mq_receive_history
报错内容
Transaction of size 181815674 exceeds specified limit 150000000. To increase the limit
please adjust group_replication_transaction_size_limit option.'
大概的意思可能就是事务量太大超过了限制的值,需要调整。
官方解释:
Use the system variable group_replication_transaction_size_limit to specify a maximum
transaction size that the group will accept. In MySQL 8.0, this system variable defaults to
a maximum transaction size of 150000000 bytes (approximately 143 MB).
Transactions above this size are rolled back and are not sent to Group Replication's
Group Communication System (GCS) for distribution to the group. Adjust the value of
this variable depending on the maximum message size that you need the group to
tolerate, bearing in mind that the time taken to process a transaction is proportional to its
size.
大概的意思:超过事务大小限制
使用系统变量 group_replication_transaction_size_limit 来指定组将接受的最大事务大小。
MySQL 8.0 中,此系统变量默认为最大事务大小为 150000000 字节(约 143 MB)。超
过此大小的事务将被回滚,并且不会发送到组复制的组通信系统(GCS)进行分发。
解决:
我们把参数设置为 0。不限制大小,看看能否成功。
set group_replication_transaction_size_limit
接着测试:成功了
我们再看下另外一个参数:group_replication_message_cache_size
当事务量继续超过 1G 时候,group_replication_transaction_size_limit 保持为 0 不做事务限
制,
也会发生节点失联导入失败。
因为超出了 xcom cache 限制,xcom cache 缓存了最近一段时间的消息信息,
当节点失联后加回集群,失联期间的消息要通过 xcom cache 来恢复,如果缓存空间不够,缺
失的消息被淘汰了,节点就无法自动加回集群,只能手动加回集群通过异步复制通道恢复数据。
官方文件解释:
xcom 使用情况可以使用如下语句查询:
of 3
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜