From 86af0f47a6f84ae33bb28552b8d417bcec4f98f6 Mon Sep 17 00:00:00 2001 From: shichun-0415 Date: Mon, 23 May 2022 15:03:23 +0800 Subject: [PATCH 1/2] dm: add a missing section --- dm/shard-merge-best-practices.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dm/shard-merge-best-practices.md b/dm/shard-merge-best-practices.md index 76b9de6ea7912..8c0f19d16d32d 100644 --- a/dm/shard-merge-best-practices.md +++ b/dm/shard-merge-best-practices.md @@ -117,6 +117,10 @@ Then you can perform the following steps to fix the `ERROR 1062 (23000): Duplica 3. Run `query-status` to verify whether the data migration task is successfully processed and whether the data from upstream has already been merged and migrated to the downstream database. +## Special processing when the upstream RDS contains sharded tables + +If the upstream data source is an RDS and it contains sharded tables, the table names in MySQL binlog might be invisible when connecting to a SQL client. For example, if the upstream is a UCloud distributed database, the table name in the binlog might have an extra prefix `_0001`. Therefore, you need to configure [table routing](dm-key-features.md#table-routing) based on the table names in binlog, instead of those in the SQL client. + ## Create/drop tables in the upstream In [Merge and Migrate Data from Sharded Tables](/dm/feature-shard-merge-pessimistic.md#principles), it is clear that the coordination of sharding DDL lock depends on whether the downstream database receives the DDL statements of all upstream sharded tables. In addition, DM currently **does not support** dynamically creating or dropping sharded tables in the upstream. Therefore, to create or drop sharded tables in the upstream, it is recommended to perform the following steps. From 1b58b78bf36b991f36af42e117f15893f496657f Mon Sep 17 00:00:00 2001 From: shichun-0415 Date: Mon, 23 May 2022 15:09:10 +0800 Subject: [PATCH 2/2] fix ci --- dm/shard-merge-best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dm/shard-merge-best-practices.md b/dm/shard-merge-best-practices.md index 8c0f19d16d32d..79854468d6cdc 100644 --- a/dm/shard-merge-best-practices.md +++ b/dm/shard-merge-best-practices.md @@ -119,7 +119,7 @@ Then you can perform the following steps to fix the `ERROR 1062 (23000): Duplica ## Special processing when the upstream RDS contains sharded tables -If the upstream data source is an RDS and it contains sharded tables, the table names in MySQL binlog might be invisible when connecting to a SQL client. For example, if the upstream is a UCloud distributed database, the table name in the binlog might have an extra prefix `_0001`. Therefore, you need to configure [table routing](dm-key-features.md#table-routing) based on the table names in binlog, instead of those in the SQL client. +If the upstream data source is an RDS and it contains sharded tables, the table names in MySQL binlog might be invisible when connecting to a SQL client. For example, if the upstream is a UCloud distributed database, the table name in the binlog might have an extra prefix `_0001`. Therefore, you need to configure [table routing](/dm/dm-key-features.md#table-routing) based on the table names in binlog, instead of those in the SQL client. ## Create/drop tables in the upstream