rename tables trigger error and add Ignore-sql configured not effective, unable to skip the rename ddl #9531
Labels
affects-6.5
affects-7.1
affects-7.3
area/ticdc
Issues or PRs related to TiCDC.
severity/moderate
type/bug
The issue is confirmed as a bug.
What did you do?
1、changefeed configuration:
[filter]
rules = ['cdctest.ta', 'cdctest.tb', 'cdctest.tc', 'cdctest.td']
2、 rename tables on upstream:
rename table cdctest.tc to cdctest.tc_bak,cdctest.td to cdctest.tc,cdctest.tc_bak to cdctest.td;
3、cdc error:
[
{
"id": "test-ticdc-tatb-task",
"namespace": "default",
"summary": {
"state": "error",
"tso": 443433743909650434,
"checkpoint": "2023-08-09 15:18:10.378",
"error": {
"time": "2023-08-09T15:29:16.383357628+08:00",
"addr": "172.16.201.141:8335",
"code": "CDC:ErrSnapshotTableNotFound",
"message": "[CDC:ErrSnapshotTableNotFound]table 111 not found in schema snapshot"
}
}
}
]
4、add ignore-sql configuration :
ignore-sql = ["^rename"]
or
ignore-sql = ["rename table cdctest.tc to cdctest.tc_bak,cdctest.td to cdctest.tc,cdctest.tc_bak to cdctest.td"]
5、update changefeed :
/home/tidb/.tiup/components/ctl/v6.5.3/cdc cli changefeed update --pd=http://xxxxx:4199 --sink-uri="mysql://root:hxxxx@172.xxxx1:4651/" --changefeed-id="test-ticdc-tatb-task" --config ticdc_task_001.toml
6、changefeed can't resume
[
{
"id": "test-ticdc-tatb-task",
"namespace": "default",
"summary": {
"state": "error",
"tso": 443433743909650434,
"checkpoint": "2023-08-09 15:18:10.378",
"error": {
"time": "2023-08-09T16:21:42.632679465+08:00",
"addr": "172.16.201.141:8335",
"code": "CDC:ErrSnapshotTableNotFound",
"message": "[CDC:ErrSnapshotTableNotFound]table 111 not found in schema snapshot"
}
}
}
]
What did you expect to see?
skip the rename ddl after add Ignore-sql configuration
What did you see instead?
[
{
"id": "test-ticdc-tatb-task",
"namespace": "default",
"summary": {
"state": "error",
"tso": 443433743909650434,
"checkpoint": "2023-08-09 15:18:10.378",
"error": {
"time": "2023-08-09T16:21:42.632679465+08:00",
"addr": "172.16.201.141:8335",
"code": "CDC:ErrSnapshotTableNotFound",
"message": "[CDC:ErrSnapshotTableNotFound]table 111 not found in schema snapshot"
}
}
}
]
Versions of the cluster
Upstream TiDB cluster version (execute
SELECT tidb_version();
in a MySQL client):Upstream TiKV version (execute
tikv-server --version
):TiCDC version (execute
cdc version
):The text was updated successfully, but these errors were encountered: