cdc同步到kafka时,延迟很大

【 TiDB 使用环境`】
生产环境

【 TiDB 版本】
v5.2.2

【遇到的问题】
通过cdc同步到kafka,发现延迟很大,我们通过脚本把tiup ctl:v5.2.2 cdc changefeed list --pd=http://10.xx.xx.xx:2379的结果发送出来,下面是最近三天的情况

在6月2号10:00时,发现checkpoint是2022-06-02 06:14:52.968
image

在6月1号10:00时,发现checkpoint是2022-05-31 19:54:58.168
image

在5月31号10:00时,发现checkpoint是2022-05-31 01:03:39.369
image

【复现路径】做过哪些操作出现的问题
【问题现象及影响】
【附件】
附件是cdc.log与cdc_stderr.log
cdc.tar.gz (10.8 MB)

之前我也提过一个帖子,关于tso与checkpoint不变化的,说是可能是bug,但是我们版本已经是升级到v5.2.2了,帖子如下:

tidb 上是不是有大量的数据变更操作, 看下 cdc CPU 资源使用率是否很高。

看了下你发的日志,你应该是这个问题:

这个帖子我也看过,不过我们已经是v5.2.2版本了。
image

看来是没有彻底解决,说是在5.3上会彻底解决

后面我们会有一次升级,到时候再观察观察。

谢谢了。

今天13点16时又出现了延迟,如下图
image

下面附件是cdc的日志,在13点16时日志如下
[2022/06/27 13:14:37.148 +08:00] [INFO] [client.go:771] [“start new request”] [request=“{"header":{"cluster_id":6891109214213304181,"ticdc_version":"5.2.2"},"region_id":68913709,"
region_epoch":{"conf_ver":12971,"version":6727},"checkpoint_ts":434190909538041867,"start_key":"dIAAAAAAABn/Zl9yAAAAAAD6","end_key":"dIAAAAAAABn/Zl9zAAAAAAD6","request_id":2
95583,"extra_op":1,"Request":null}”] [addr=10.194.7.76:20160]
[2022/06/27 13:14:37.158 +08:00] [INFO] [client.go:1043] [“stream to store closed”] [addr=10.97.13.168:20160] [storeID=18201]
[2022/06/27 13:16:20.821 +08:00] [INFO] [region_worker.go:247] [“single region event feed disconnected”] [regionID=68926776] [requestID=294322] [span=“[7480000000000013ff245f720000000000fa,
7480000000000013ff245f730000000000fa)”] [checkpoint=434190937154912259] [error=“[CDC:ErrEventFeedEventError]not_leader:<region_id:68926776 > : not_leader:<region_id:68926776 > “]
[2022/06/27 13:16:20.821 +08:00] [INFO] [region_worker.go:247] [“single region event feed disconnected”] [regionID=68926776] [requestID=294465] [span=”[7480000000000013ffe65f720000000000fa,
7480000000000013ffe65f730000000000fa)”] [checkpoint=434190937154912259] [error=“[CDC:ErrEventFeedEventError]not_leader:<region_id:68926776 > : not_leader:<region_id:68926776 > “]
[2022/06/27 13:16:20.821 +08:00] [INFO] [region_worker.go:247] [“single region event feed disconnected”] [regionID=68926776] [requestID=294307] [span=”[7480000000000013fffb5f720000000000fa,
7480000000000013fffb5f730000000000fa)”] [checkpoint=434190937154912259] [error=“[CDC:ErrEventFeedEventError]not_leader:<region_id:68926776 > : not_leader:<region_id:68926776 > “]
[2022/06/27 13:16:20.821 +08:00] [INFO] [region_range_lock.go:370] [“unlocked range”] [lockID=1163] [regionID=68926776] [startKey=7480000000000013ffe65f720000000000fa] [endKey=74800000000000
13ffe65f730000000000fa] [checkpointTs=434190937154912259]
[2022/06/27 13:16:20.821 +08:00] [INFO] [region_worker.go:247] [“single region event feed disconnected”] [regionID=68926776] [requestID=294317] [span=”[7480000000000013ff1d5f720000000000fa,
7480000000000013ff1d5f730000000000fa)”] [checkpoint=434190937154912259] [error="[CDC:ErrEventFeedEventError]not_leader:<region_id:68926776 > : not_leader:<region_id:68926776 > "]
[2022/06/27 13:16:20.821 +08:00] [INFO] [region_worker.go:264] [“EventFeed retry rate limited”] [delay=99.868229ms] [regionID=68926776]

cdc.tar.gz (11.0 MB)

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。