To Nha Notes | Sept. 29, 2023, 12:16 p.m.
Follow the following steps to recover it.
1. Pickup the appropriate latest binary log file and position
mysql> show binary logs;
| mysql-bin-changelog.045714 | 134222725 | No |
| mysql-bin-changelog.045715 | 1748530 | No |
| mysql-bin-changelog.045716 | 134246033 | No |
| mysql-bin-changelog.045717 | 2207734 | No |
| mysql-bin-changelog.045718 | 57622660 | No |
+----------------------------+-----------+-----------+
2. Stop replication task which has Table error, set the replication task to point to selected binary log file and position.
3. Restart the modified replication task
Table error: This nonfatal error says that this particular table failed loading for some reason. You can find out the reason from the task logs.Note: If you’re migrating many tables, you can choose to use the filter box preceding the table list to filter only for tables with errors.
We may found below error from CloudWatch Logs of AWS DMS tasks
2023-09-27T16:57:27 [SOURCE_CAPTURE ]W: Cannot change partition in table 'XXX'. Altering partitions is not currently supported (mysql_endpoint_capture.c:1871)
2023-09-27T16:57:27 [SOURCE_CAPTURE ]W: Suspending table 'XXX', task_id '4' (mysql_endpoint_capture.c:1673)
In this case, the logs said that the cause would be task has handled a DDL which is not supported yet.
Below is how to resolve it.
- Stop task which got error
- Modify CDC task settings as below to skip DDL handling
"ChangeProcessingDdlHandlingPolicy": {
"HandleSourceTableDropped": true,
"HandleSourceTableTruncated": true,
"HandleSourceTableAltered": true
}
- Modify task to change CDC start position to the timing before DDL operation performed such as following
mysql-bin-changelog.849896:44825746
- Restart the task
We may lack CDC data after DDL operation started until CDC start position modified above mysql-bin-changelog.849896:44825746 so we may need hack updates to source data to retrigger CDC for these missing data changes.