DM synchronization delay time is inaccurate

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: DM同步延迟时间不准

| username: 舞动梦灵

A new data source was added to the original DM server to synchronize data. The status check shows that the delay time is continuously increasing, but in reality, the data is being synchronized normally in real-time. How can this be investigated?

| username: DBAER | Original post link

Check the time on both servers.

| username: 舞动梦灵 | Original post link

Checked. The server times on both sides are the same, so there shouldn’t be an issue with that. There are 4 workers synchronizing on this DM server. The other three are normal, but the delay time for this newly added one keeps increasing. The date and time on both servers are as shown in the image.

| username: 健康的腰间盘 | Original post link

This seems like a bug, please file an issue.

| username: Sword | Original post link

Try restarting the work node.

| username: shigp_TIDBER | Original post link

It is recommended to restart the standby replication of DM.

| username: 舞动梦灵 | Original post link

Pause the task and then resume it? When you say successful restart, do you mean the server restart or the service restart? I don’t want to risk a lot for a small issue. I have one server running four works, and only one is showing a problem. :joy:

| username: 友利奈绪 | Original post link

Try restarting it.

| username: TiDBer_QYr0vohO | Original post link

Try stopping the task and then starting it again.

| username: yytest | Original post link

It is necessary to check the NTP service.

| username: 呢莫不爱吃鱼 | Original post link

Try restarting the task.

| username: zhaokede | Original post link

Check how much the time difference is between the two servers.

| username: 不想干活 | Original post link

It feels like a bug, try restarting and see.

| username: TiDBer_RjzUpGDL | Original post link

Is the server time consistent?

| username: 舞动梦灵 | Original post link

Both servers are the same.

| username: WalterWj | Original post link

Looking at the binlog positions, they are different. Did it catch up with the synchronization later? Could it be that some large transactions caused the high delay? :thinking:

| username: 舞动梦灵 | Original post link

All four of my synchronizations are like this, with slight point differences, but they are all synchronized in real-time. There are no large transactions.

| username: WalterWj | Original post link

That depends on how this latency is calculated… It feels like there’s an issue with the calculation. :thinking:

| username: 舞动梦灵 | Original post link

Well, the other three tasks are all kept within 10, only this one keeps growing, probably due to a bug. As long as it doesn’t affect synchronization, it’s fine. I created a separate table to update the date every minute and monitor the status of this table. If there’s a delay, it will alert. So there’s no need to worry.