diff --git a/en/shard-merge-best-practices.md b/en/shard-merge-best-practices.md index a6ba152e..02897ddf 100644 --- a/en/shard-merge-best-practices.md +++ b/en/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](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. diff --git a/zh/shard-merge-best-practices.md b/zh/shard-merge-best-practices.md index 4778d409..302d3a7c 100644 --- a/zh/shard-merge-best-practices.md +++ b/zh/shard-merge-best-practices.md @@ -116,7 +116,7 @@ CREATE TABLE `tbl_multi_pk` ( ## 上游 RDS 封装分库分表的处理 -上游数据源为 RDS 且使用了其分库分表功能的情况下,MySQL binlog 中的表名在 SQL client 连接时可能并不可见。例如在 UCloud 分布式数据库 [UDDB](https://www.ucloud.cn/site/product/uddb.html) 中,其 binlog 表名可能会多出 `_0001` 的后缀。这需要根据 binlog 中的表名规律,而不是 SQL client 所见的表名,来配置 [table routing 规则](dm-key-features.md#table-routing)。 +上游数据源为 RDS 且使用了其分库分表功能的情况下,MySQL binlog 中的表名在 SQL client 连接时可能并不可见。例如在 UCloud 分布式数据库 [UDDB](https://docs.ucloud.cn/uddb/README) 中,其 binlog 表名可能会多出 `_0001` 的后缀。这需要根据 binlog 中的表名规律,而不是 SQL client 所见的表名,来配置 [table routing 规则](dm-key-features.md#table-routing)。 ## 合表迁移过程中在上游增/删表