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

There was no problem when creating tasks before, but today there was an issue when creating tasks.
Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
There was no problem when creating tasks before, but today there was an issue when creating tasks.
Some tables do not meet the replication conditions ([kiki.sele_demo]). If you want to ignore these tables, please set ignore_ineligible_table.
Where should I modify the source code for directly deploying ticdc?
It should be caused by the lack of a primary key in the kiki.sele_demo
table. TiCDC does not support synchronizing tables without a primary key.
So where should I make the changes? I am using Go for deployment.
You don’t need to modify the TiCDC source code for this. Just add ignore_ineligible_table=true
to the URL when creating the changefeed. However, remember that in this case, CDC will skip changes to the kiki.sele_demo
table.
To synchronize tables without effective indexes, you can configure two parameters, but there are some precautions that need attention. You can refer to the official documentation above.
Here is an example configuration file with the ignore_ineligible_table
option set:
{
"changefeed-id": "example-changefeed",
"sink-uri": "mysql://user:password@localhost:3306/test",
"enable-old-value": true,
"start-ts": 425091232384233219,
"target-ts": 425091232384233219,
"filter": {
"rules": [
{
"pattern": "test.*",
"ignore-txn-start-ts": 0,
"action": "include"
}
]
},
"config": {
"case-sensitive": false,
"enable-old-value": true,
"dispatch-safety-checker": true,
"filter": {
"rules": [
{
"pattern": "kiki.sele_demo",
"ignore-txn-start-ts": 0,
"action": "ignore"
}
]
},
"mounter": {
"worker-num": 16
},
"cdc": {
"batch-size": 4096,
"region-concurrency": 10,
"enable-old-value": true
}
}
}
In the above configuration file, the filter
section is used to include all tables in the test
database, and the config.filter
section is used to ignore the [kiki.sele_demo]
table.
Save the configuration file to a location on your system, such as /path/to/config.json
, and then use the following command to create the task:
cdc cli --start-task --config /path/to/config.json
This will create a task with the specified configuration and should ignore ineligible tables.