使用场景:
tidb 集群20+ 节点,每天大量的插入数据,使用ticdc 同步tidb 的变更数据到下游kafka 中
由5.3.0 版本ticdc 依然存在延迟问题,于是升级tidb 到5.4.0 版本
使用后出现的问题:
ticdc 无法缓冲已经延迟的数据,出现panic 错误
[2022/02/18 12:51:16.319 +08:00] [INFO] [region_range_lock.go:246] ["tryLockRange stale"] [lockID=3] [regionID=4806118] [startKey=7480000000000001ff6a5f72e000000034ff06ac190000000000fa] [endKey=7480000000000001ff6a5f72e000000034ff16a0730000000000fa] [allOverlapping="[\"regionID: 4806118, ver: 4875, start: 7480000000000001ff6a5f72e000000034ff06ac190000000000fa, end: 7480000000000001ff6a5f72e000000034ff16a0730000000000fa\"]"]
[2022/02/18 12:51:16.319 +08:00] [INFO] [client.go:616] ["request expired"] [regionID=4806118] [span="[7480000000000001ff6a5f72e000000034ff06ac190000000000fa, 7480000000000001ff6a5f72e000000034ff16a0730000000000fa)"] [retrySpans="[]"]
[2022/02/18 12:51:17.473 +08:00] [PANIC] [canal.go:167] ["unsigned value not in type uint64"] [column="{\"name\":\"customer_sid\",\"type\":8,\"flag\":129,\"value\":\"0\"}"] [stack="github.com/pingcap/tiflow/cdc/sink/codec.getJavaSQLType\
\tgithub.com/pingcap/tiflow/cdc/sink/codec/canal.go:167\
github.com/pingcap/tiflow/cdc/sink/codec.(*canalEntryBuilder).buildColumn\
\tgithub.com/pingcap/tiflow/cdc/sink/codec/canal.go:280\
github.com/pingcap/tiflow/cdc/sink/codec.(*canalEntryBuilder).buildRowData\
\tgithub.com/pingcap/tiflow/cdc/sink/codec/canal.go:317\
github.com/pingcap/tiflow/cdc/sink/codec.(*CanalFlatEventBatchEncoder).newFlatMessageForDML\
\tgithub.com/pingcap/tiflow/cdc/sink/codec/canal_flat.go:178\
github.com/pingcap/tiflow/cdc/sink/codec.(*CanalFlatEventBatchEncoder).AppendRowChangedEvent\
\tgithub.com/pingcap/tiflow/cdc/sink/codec/canal_flat.go:321\
github.com/pingcap/tiflow/cdc/sink.(*mqSink).runWorker\
\tgithub.com/pingcap/tiflow/cdc/sink/mq.go:338\
github.com/pingcap/tiflow/cdc/sink.(*mqSink).run.func1\
\tgithub.com/pingcap/tiflow/cdc/sink/mq
此时ticdc 已经无法正常向下游同步数据。ticdc 监控大致如下