mysql - 无效的复制时间戳

mysql - invalid replication timestamps

我在同一 LAN 中的两台 windows 机器上 运行 的两台 mysql 服务器 (v8.0.12) 之间设置了主-主复制。

到目前为止,复制似乎工作正常。但是,存在一个问题:错误日志中填满了这些条目:

2019-07-04T11:17:54.694565+01:00 5 [Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp. This may be an issue if delayed replication is active. Make sure that servers have their clocks set to the correct time. No further message will be emitted until after timestamps become valid again.
2019-07-04T11:17:54.696796+01:00 5 [Warning] [MY-010957] [Server] The replication timestamps have returned to normal values.
2019-07-04T11:17:54.702435+01:00 5 [Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp. This may be an issue if delayed replication is active. Make sure that servers have their clocks set to the correct time. No further message will be emitted until after timestamps become valid again.
2019-07-04T11:17:54.704768+01:00 5 [Warning] [MY-010957] [Server] The replication timestamps have returned to normal values.
2019-07-04T11:17:54.711469+01:00 5 [Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp. This may be an issue if delayed replication is active. Make sure that servers have their clocks set to the correct time. No further message will be emitted until after timestamps become valid again.
2019-07-04T11:17:54.713675+01:00 5 [Warning] [MY-010957] [Server] The replication timestamps have returned to normal values.
2019-07-04T11:17:54.716626+01:00 5 [Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp. This may be an issue if delayed replication is active. Make sure that servers have their clocks set to the correct time. No further message will be emitted until after timestamps become valid again.
2019-07-04T11:17:54.718956+01:00 5 [Warning] [MY-010957] [Server] The replication timestamps have returned to normal values.

服务器 1 作为服务器 2 的 windows 时间服务器,据我所知,两台服务器具有相同的时间(当然还有时区)。由于它们在同一个局域网中,它们之间没有明显的网络延迟(ping < 1ms)。 @@global.time_zone 变量 returns 'SYSTEM'。但是,我没有在 my.ini 文件中设置任何时区。 SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP) returns '02:00:00'。 我没有设置任何复制延迟,因为我对更改的快速传播感兴趣。

我非常绝望,因为错误日志在几个月内就超过了 5 GB。 有没有人知道如何进一步分析问题(例如显示当前时间延迟的任何 mysql 内部 table)?

感谢任何提示,Leo

MySQL 对非常小的时钟差异很敏感。请在此处查看 Bug/Enhancement:

https://bugs.mysql.com/bug.php?id=95422

您应该验证您的时钟是否已同步,并将警告视为 警告