Issues with Merging and Synchronizing Sharded Data in DM

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

Original topic: dm分表数据合并同步问题

| username: mono

[TiDB Usage Environment] Production Environment
[TiDB Version] tidb-6.5.5

Using DM to synchronize MySQL data to the TiDB cluster. Merging partitioned table data into TiDB. The scenario is as follows:
MySQL tables:
test.t1_202312 test.t1_202311 test.t1_202310

TiDB table:
mydb.t1

Now there is the following issue: because the partitioned tables in the MySQL database only retain data from the last 2 months, after executing drop table test.t1_202310 and then executing DDL such as alter table t_202312 add column c4 char(10), since the table t1_202310 has already been deleted, it cannot be synchronized. Therefore, the DM synchronization task gets stuck and cannot continue. Is there any way to recover?
The DM task prompts as follows:
“synced”: [
mydb.t1_202311”,
mydb.t1_202312
],
“unsynced”: [
mydb.t1_202310
]

| username: Fly-bird | Original post link

Has the original table been deleted?

| username: mono | Original post link

Yes. The tables are divided by month. Tables will be deleted periodically, keeping only the most recent few months.

| username: Billmay表妹 | Original post link

What problem are you trying to solve?

Restoring data or hoping to synchronize normally?

| username: tidb菜鸟一只 | Original post link

Can binlog skip taskname?

| username: mono | Original post link

Normal synchronization.

| username: 像风一样的男子 | Original post link

By using the binlog skip command to skip the DDL statement, you can resume the migration task.

| username: TiDBer_小阿飞 | Original post link

You can rebuild the table structure of t_202312 in MySQL, and manually delete it after the DM task is completed.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.