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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章