diff --git a/dm/dm-faq.md b/dm/dm-faq.md index 29fc3f7e6309f..12e5821c848c0 100644 --- a/dm/dm-faq.md +++ b/dm/dm-faq.md @@ -52,7 +52,7 @@ When an exception occurs during data migration and the data migration task canno - Specify a new task name in the task configuration file. Then execute `start-task {task-config-file}`. - Execute `start-task --remove-meta {task-config-file}`. -## How to handle the error returned by the DDL operation related to the gh-ost table, after `online-ddl-scheme: "gh-ost"` is set? +## How to handle the error returned by the DDL operation related to the gh-ost table, after `online-ddl: true` is set? ``` [unit=Sync] ["error information"="{\"msg\":\"[code=36046:class=sync-unit:scope=internal:level=high] online ddls on ghost table `xxx`.`_xxxx_gho`\\ngithub.com/pingcap/dm/pkg/terror.(*Error).Generate ...... @@ -71,13 +71,13 @@ Therefore, in the process of incremental replication, if the specified Pos has s You can avoid this error by the following steps: -1. Remove the `online-ddl-scheme` configuration of the task. +1. Remove the `online-ddl-scheme` or `online-ddl` configuration of the task. 2. Configure `_{table_name}_gho`, `_{table_name}_ghc`, and `_{table_name}_del` in `block-allow-list.ignore-tables`. 3. Execute the upstream DDL in the downstream TiDB manually. -4. After the Pos is replicated to the position after the gh-ost process, re-enable the `online-ddl-scheme` and comment out `block-allow-list.ignore-tables`. +4. After the Pos is replicated to the position after the gh-ost process, re-enable the `online-ddl-scheme` or `online-ddl` configuration and comment out `block-allow-list.ignore-tables`. ## How to add tables to the existing data migration tasks? @@ -399,4 +399,4 @@ You can avoid this error by the following options: ## Why does the load unit report the `Unknown character set` error? -TiDB does not support all MySQL character sets. Therefore, DM reports this error if an unsupported character set is used when creating the table schema during a full import. To bypass this error, you can create the table schema in the downstream in advance using the [character sets supported by TiDB](/character-set-and-collation.md) according to the specific data. \ No newline at end of file +TiDB does not support all MySQL character sets. Therefore, DM reports this error if an unsupported character set is used when creating the table schema during a full import. To bypass this error, you can create the table schema in the downstream in advance using the [character sets supported by TiDB](/character-set-and-collation.md) according to the specific data. diff --git a/dm/dm-online-ddl-tool-support.md b/dm/dm-online-ddl-tool-support.md index 3ed9816841b53..ccf52889e1779 100644 --- a/dm/dm-online-ddl-tool-support.md +++ b/dm/dm-online-ddl-tool-support.md @@ -14,7 +14,7 @@ For the working principles and implementation methods of DM for online DDL tools ## Restrictions - DM only supports gh-ost and pt-osc. -- When `online-ddl` is enabled, the checkpoint corresponding to incremental replication should not be in the process of online DDL execution. For example, if an upstream online DDL operation starts at `position-A` and ends at `position-B` of the binlog, the starting point of incremental replication should be earlier than `position-A` or later than `position-B`; otherwise, an error occurs. For details, refer to [FAQ](/dm/dm-faq.md#how-to-handle-the-error-returned-by-the-ddl-operation-related-to-the-gh-ost-table-after-online-ddl-scheme-gh-ost-is-set). +- When `online-ddl` is enabled, the checkpoint corresponding to incremental replication should not be in the process of online DDL execution. For example, if an upstream online DDL operation starts at `position-A` and ends at `position-B` of the binlog, the starting point of incremental replication should be earlier than `position-A` or later than `position-B`; otherwise, an error occurs. For details, refer to [FAQ](/dm/dm-faq.md#how-to-handle-the-error-returned-by-the-ddl-operation-related-to-the-gh-ost-table-after-online-ddl-true-is-set). ## Configure parameters diff --git a/dm/feature-online-ddl.md b/dm/feature-online-ddl.md index c9e18cc73d920..e853ef67ff688 100644 --- a/dm/feature-online-ddl.md +++ b/dm/feature-online-ddl.md @@ -8,13 +8,13 @@ aliases: ['/docs/tidb-data-migration/dev/online-ddl-scheme/','tidb-data-migratio In production scenarios, table locking during DDL execution can block the reads from or writes to the database to a certain extent. Therefore, online DDL tools are often used to execute DDLs to minimize the impact on reads and writes. Common DDL tools are [gh-ost](https://github.com/github/gh-ost) and [pt-osc](https://www.percona.com/doc/percona-toolkit/3.0/pt-online-schema-change.html). -When using DM to migrate data from MySQL to TiDB, you can enbale online-ddl to allow collaboration of DM and gh-ost or pt-osc. For details about how to enable online-ddl and the workflow after enabling this option, see [Continuous Replication with gh-ost or pt-osc](/migrate-with-pt-ghost.md). This document focuses on the collaboration details of DM and online DDL tools. +When using DM to migrate data from MySQL to TiDB, you can enable online-ddl to allow collaboration of DM and gh-ost or pt-osc. For details about how to enable online-ddl and the workflow after enabling this option, see [Continuous Replication with gh-ost or pt-osc](/migrate-with-pt-ghost.md). This document focuses on the collaboration details of DM and online DDL tools. ## Working details for DM with online DDL tools This section describes the working details for DM with the online DDL tools [gh-ost](https://github.com/github/gh-ost) and [pt-osc](https://www.percona.com/doc/percona-toolkit/3.0/pt-online-schema-change.html) when implementing online-schema-change. -### online-schema-change: gh-ost +## online-schema-change: gh-ost When gh-ost implements online-schema-change, 3 types of tables are created: