TiDB CDC Connector Retrieves Incorrect Incremental Operation Time from TiDB Operation Timestamp Metadata

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

Original topic: TiDB CDC Connector 读取 TiDB 操作时间元数据的时取到的增量操作时间错误

| username: TiDBer_CQ

SET execution.result-mode=tableau;
SET execution.checkpointing.interval=10sec;
SET enable_insert_strict = true;
DROP TABLE IF EXISTS person;
CREATE TABLE IF NOT EXISTS person (
    operation_ts TIMESTAMP(0) METADATA FROM 'op_ts' VIRTUAL, 
    `id` INT NOT NULL 
    ,`name` STRING
    ,`birthday` DATE
    ,PRIMARY KEY ( `id` ) NOT ENFORCED
) WITH (
 'connector' = 'tidb-cdc'
,'pd-addresses' = 'xxx:2379,xxx:2379,xxxx:2379'
,'scan.startup.mode' = 'initial'
,'tikv.grpc.timeout_in_ms' = '30000'
,'tikv.grpc.scan_timeout_in_ms' = '30000'
,'tikv.batch_get_concurrency' = '2000'
,'server-time-zone' = 'Asia/Shanghai'
,'database-name' = 'testdb'
,'table-name' = 'person'
);

select * from person;

![image|690x149](https://asktug.com/uploads/default/original/4X/7/3/9/7391c78ce08c235dcbec331d4b5a2807009f60a5.png)
| username: 大鱼海棠 | Original post link

Because when scanning the incremental data {checkpoint_ts, current_ts}, current_ts is passed as int64 max.

| username: TiDBer_CQ | Original post link

Is there a solution?

| username: 大鱼海棠 | Original post link

What needs to be done now? Does it depend on this time?

| username: TiDBer_小小 | Original post link

The same problem.

| username: TiDBer_小小 | Original post link

The information suggests not using Flink’s TiDB CDC and replacing it with TiDB CDC.

| username: miya | Original post link

Is it caused by a timezone mismatch? You might want to check the timezone configuration.