mysql-无效的复制时间戳

时间:2019-07-04 09:27:10

标签: mysql database-replication

我已经在同一局域网中的两台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变量返回'SYSTEM'。但是,我尚未在my.ini文件中设置任何时区。 SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP)返回“ 02:00:00”。 我没有设置任何复制延迟,因为我对更改的快速传播很感兴趣。

我非常绝望,因为错误日志在一个月的时间内填满了大于5 GB的大小。 有谁知道如何进一步分析问题(例如,任何显示当前时间延迟的mysql内部表)?

谢谢你的提示,狮子座

1 个答案:

答案 0 :(得分:0)

MySQL对很小的时钟差异很敏感。在此处查看错误/增强功能:

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

您应验证自己的时钟已同步,并发出警告警告