Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 配置文件中配置ignore-txn-start-ts参数不生效
【TiDB Usage Environment】Production, Testing, Research
【TiDB Version】
【Encountered Problem】
Using the ignore-txn-start-ts parameter in the configuration file to skip specified operations did not take effect.
-
Stop CDC replication
-
Insert a record with ID=333 in the upstream (at this point, the downstream table does not have a record with ID=333)
insert into cdcdb.test5 values(333) -
Check the current database’s TSO
cdc cli --pd=http://xxx.xxx.xxx.xxx tso query
434708167235993601 -
Edit the synchronization configuration file to add ignore-txn-start-ts
vi cdc.toml
ignore-txn-start-ts = [434708167235993601] -
Start CDC replication
$ tiup ctl:v4.0.16 cdc changefeed update --pd=http://xxx.xxx.xxx.xxx:2379 --changefeed-id=“cdc2” --config cdc.toml
Starting componentctl
: /home/tidb/.tiup/components/ctl/v4.0.16/ctl cdc changefeed update --pd=http://xxx.xxx.xxx.xxx:2379 --changefeed-id=cdc2 --config cdc.toml
Diff of changefeed config:
{Type:create Path:[Config Filter IgnoreTxnStartTs 0] From: To:434708167235993601}
Could you agree to apply changes above to changefeed [Y/N]
y
Update changefeed config successfully! Will take effect only if the changefeed has been paused before this command
ID: cdc2
Info: {“sink-uri”:“tidb://root:admin@10.19.248.128:4000/”,“opts”:{“_changefeed_id”:“cli-verify”},“create-time”:“2022-07-19T11:00:21.200455131+08:00”,“start-ts”:434686528597262343,“target-ts”:0,“admin-job-type”:1,“sort-engine”:“unified”,“sort-dir”:“”,“config”:{“case-sensitive”:true,“enable-old-value”:true,“force-replicate”:true,“check-gc-safe-point”:true,“filter”:{“rules”:[“.”],“ignore-txn-start-ts”:[434708167235993601]},“mounter”:{“worker-num”:16},“sink”:{“dispatchers”:null,“protocol”:“default”},“cyclic-replication”:{“enable”:false,“replica-id”:0,“filter-replica-ids”:null,“id-buckets”:0,“sync-ddl”:false},“scheduler”:{“type”:“table-number”,“polling-time”:-1}},“state”:“stopped”,“history”:null,“error”:null,“sync-point-enabled”:false,“sync-point-interval”:600000000000,“creator-version”:“v4.0.16”} -
Check the changefeed information, and there is ignore-txn-start-ts related information
tiup ctl:v4.0.16 cdc changefeed query --pd=http://xxx.xxx.xxx.xxx:2379 --changefeed-id=cdc2
Starting componentctl
: /home/tidb/.tiup/components/ctl/v4.0.16/ctl cdc changefeed query --pd=http://xxx.xxx.xxx.xxx:2379 --changefeed-id=cdc2
{
“info”: {
“sink-uri”: “tidb://root:admin@10.19.248.128:4000/”,
“opts”: {
“_changefeed_id”: “cli-verify”
},
“create-time”: “2022-07-19T11:00:21.200455131+08:00”,
“start-ts”: 434686528597262343,
“target-ts”: 0,
“admin-job-type”: 0,
“sort-engine”: “unified”,
“sort-dir”: “”,
“config”: {
“case-sensitive”: true,
“enable-old-value”: true,
“force-replicate”: true,
“check-gc-safe-point”: true,
“filter”: {
“rules”: [
“.”
],
“ignore-txn-start-ts”: [
434708167235993601
]
}, -
Check the downstream for ID=333 and find that the record has been synchronized.
Question: Why is this happening? It seems that ignore-txn-start-ts did not take effect.
【Reproduction Path】What operations were performed to encounter the problem
【Problem Phenomenon and Impact】
【Attachments】
Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.