Invalid replication timestamps warnings MySQL 8.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

上一篇:php5.2 Json不能正确处理中文的解决办法


下一篇:.net发送电子邮件关键代码