Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用canal每次拉取的binlog日志时间比当前时间慢 #1111

Open
XiongMMaq opened this issue Aug 29, 2023 · 0 comments
Open

使用canal每次拉取的binlog日志时间比当前时间慢 #1111

XiongMMaq opened this issue Aug 29, 2023 · 0 comments

Comments

@XiongMMaq
Copy link

2023-08-29 12:28:00.050 [Task-7-Reader-reader-mysql] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - getWithoutAck successfully, client
Id:1001 batchSize:2000 real size is 2 and result is [batchId:11245 , position:PositionRange[start=LogPosition[identity=LogIdentity[sourceAddress=xxx,slaveId=-1],postion=EntryPosition[included=false,journalName=mysql-bin.001061,position=2145,s
erverId=3010567333,gtid=,timestamp=1693312070000]],ack=LogPosition[identity=LogIdentity[sourceAddress=xxx,slaveId=-1],postion=EntryPosition[included=false,journalName=mysql-bin.001061,position=2318,serverId=3010567333,gtid=,timestamp=169331207
0000]],end=LogPosition[identity=LogIdentity[sourceAddress=xxx,slaveId=-1],postion=EntryPosit
ion[included=false,journalName=mysql-bin.001061,position=2318,serverId=3010567333,gtid=,timestamp=1693312070000]],endSeq=87125]]

比如上面的Canal拉取日志:
拉取日志时间为: 2023-08-29 12:28:00 , 但是返回结果中binlog的timestamp: 1693312070000转成UTC时间是:2023-08-29 12:27:50, 比当前时间少了10秒, 这不是偶发而是一直保持10秒左右的差异,即使数据量很少的情况下,这个问题的影响是数据同步存在延迟, 造成这个现象可能原因是什么?

其中canal.server版本:

com.alibaba.otter
canal.server
1.1.4

PS: 数据库主从延迟2ms左右,不是主从延迟的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant