首页 > 数据库技术 > 详细

Invalid replication timestamps warnings MySQL 8.0

时间:2020-12-03 10:07:08      阅读:133      评论:0      收藏:0      [点我收藏+]
环境:
MySQL 8.0.19 MGR架构,报错日志中有告警,经过查看发现是一个BUG,记录一下。
Modified: Mar 7, 2019 Type: PROBLEM
Rate this document Email link to this document Open document in new window Printable Page

In this Document
Symptoms
Cause
Solution
References

APPLIES TO:
MySQL Server - Version 8.0 and later
Information in this document applies to any platform.
SYMPTOMS
Replication slaves have many warnings, that look like this:

[Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp.
[Warning] [MY-010957] [Server] The replication timestamps have returned to normal values.

CAUSE
This warning is thrown, when timestamp of commit on the slave is lower than timestamp of commit on master for the same transaction. For these timestamps, MySQL Server uses not only milliseconds, but also microseconds. At the same time, even with NTP servers working properly on all hosts, time accuracy is still at least ~10ms. It is still enough to potentially trigger this warning.

SOLUTION
In most cases these warnings do not require any additional action. However, in some cases there are too many of them, which can make reading error log harder and increase disk space usage for error log. To prevent spamming of these warnings too much, MySQL Server only prints one warning until order of timestamps goes back to normal. It means that if time on slave is significantly behind master, it will probably result in only one warning. However, in some cases time difference between master and slave is very close to average time that it takes for transaction to go to slave and be committed there. As a result error log can have new warning every few transactions.

This behavior should be improved in this enhancement request:

Bug 29369007 : INVALID REPLICATION TIMESTAMPS WARNINGS SPAM

If amount of warnings is too high, you can try reconfiguring time on these hosts. If amount of warnings remains too high, it is also possible to change error log verbosity.

Invalid replication timestamps warnings MySQL 8.0

原文:https://blog.51cto.com/roidba/2558397

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!