Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 重新更新任务配置文件,或者重新同步过滤的库?
[TiDB Usage Environment] Test Environment
[TiDB Version] 6.3
[Encountered Issue]
task-mode: all
Scenario:
- The original data migration task configuration filters a specific table in a specific database, and it has been running normally for a while.
- Now I want to resynchronize the previously filtered table.
- How should I configure the update in a task configuration file, or what steps support this scenario?
Test:
I used the command tiup dmctl --master-addr xxx start-task --remove-meta ./task.yaml
It seems that using this command can synchronize the previously ignored table. What impact does this command have on subsequent synchronization?
This command should delete the metadata table and then resynchronize it. The prerequisite is also to clear the downstream table.
Here is the operation process I follow:
- Create a new task specifically to synchronize that table.
- Wait for the table synchronization to complete and find the low peak period for changes to that table.
- Ensure that neither task has any delay, then stop the full synchronization task first, followed by stopping the new table synchronization task (this ensures that the GTID executed by the full task is less than that of the new table, preventing any changes to the new table from being lost).
- Modify the configuration of the full synchronization task and start the full synchronization task (when starting/resuming the task, DM will automatically enable safe_mode, so theoretically, even if there are changes to the new table during the two stop-task periods, it can still be synchronized normally).
The standard operating steps can be found in the official documentation, but you need to manually modify the metadata.