CDC failed to synchronize data

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

Original topic: CDC未能同步到数据

| username: 末日温度

[TiDB Usage Environment] Production Environment
[TiDB Version] v6.1.0
[Reproduction Path] Performing CDC synchronization, from TiDB to MySQL
The TiDB cluster data is synchronized to two MySQL backup databases using two CDC services. Each instance synchronizes approximately 40 tables, divided into different changefeed-ids for synchronization. Each changefeed-id handles 8 tables, creating two synchronization tasks, each for one MySQL database, with approximately 10 changefeed-ids.
[Encountered Problem: Phenomenon and Impact]
Occasionally, one MySQL backup database fails to synchronize data from the primary database, while the other backup database has no issues.

[Attachment: Screenshot/Log/Monitoring]

| username: db_user | Original post link

If it occurs frequently, you can capture packets in CDC to see what commands are being issued. Then, extract the general logs of the two replicas and compare them to see which one hasn’t synchronized, whether there are deadlocks causing commands not to execute, whether there are any error statements, and check the CDC logs for the corresponding time.

| username: neilshen | Original post link

TiCDC only guarantees eventual consistency. During synchronization, it is possible for temporary data inconsistencies to occur between upstream and downstream.

In this example, it is possible that the “unsynchronized” changefeed is lagging in synchronization.