TiCDC Unable to Synchronize DDL Operations

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

Original topic: ticdc无法同步ddl操作

| username: liyuntang

[TiDB Usage Environment] Production Environment / Testing / Poc
Testing environment running in k8s
[TiDB Version]
v5.4.1
[Reproduction Path] What operations were performed to cause the issue
Normal start of ticdc for incremental data synchronization to MySQL and Kafka
[Encountered Issue] DML operations can be synchronized to Kafka and MySQL normally, but DDL operations cannot be synchronized to MySQL and Kafka

[Resource Configuration]

[Attachments: Screenshots/Logs/Monitoring]
Test Program:

[root@vm10-0-2-6 ticdc]# cat operate.sh
namespace=$bbb
Db=$1
Host=`kubectl get svc -n $namespace | grep basic-tidb | grep -v peer | awk '{print $3}'`

while true
do
        if [[ $2 == "dml" ]];then
                createTime=`date "+%Y-%m-%d %H:%M:%S"`
                echo "dml >>>>>>>> $createTime"
                mysql -u$User -p$Passwd -h $Host -P 4000 -e "create database if not exists $Db;use $Db;CREATE TABLE if not exists aaa (id int(11) NOT NULL AUTO_INCREMENT,create_time datetime DEFAULT NULL,PRIMARY KEY (id)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;insert into aaa(create_time) values ('$createTime');"
        else
                suffix=`date "+%H_%M_%S"`
                echo "ddl >>>>>>>> $suffix"
                mysql -u$User -p$Passwd -h $Host -P 4000 -e "create database if not exists $Db;use $Db;CREATE TABLE if not exists aaa_${suffix} (id int(11) NOT NULL AUTO_INCREMENT,create_time datetime DEFAULT NULL,PRIMARY KEY (id)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;"
        fi
        sleep 1
done

DML synchronization monitoring

DDL synchronization monitoring

| username: Billmay表妹 | Original post link

The configuration doesn’t seem to be sufficient~

| username: Billmay表妹 | Original post link

TiCDC in version v6.2.0 supports the DDL filtering feature. You can try upgrading to see if your issue still persists~

| username: Meditator | Original post link

Can you query the changefeed to see its status if the upstream TiDB continuously sends DB creation statements to the downstream?

| username: neilshen | Original post link

From the monitoring, it can be seen that the checkpoint is continuously advancing, indicating that there is DDL being synchronized. Currently, the speed of DDL synchronization by TiCDC is relatively slow, so an increase in delay can be observed. Generally speaking, the synchronization delay for individual DDLs like CREATE TABLE is between 0.1 to 1 second.