
今天在 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
评论