Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Commit 469938f

Browse files
authored
Fix broken link in shard-merge-best-practices.md and addd a missing section (#900) (#901)
1 parent 71a0e1b commit 469938f

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

en/shard-merge-best-practices.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ Then you can perform the following steps to fix the `ERROR 1062 (23000): Duplica
117117

118118
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.
119119

120+
## Special processing when the upstream RDS contains sharded tables
121+
122+
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](key-features.md#table-routing) based on the table names in binlog, instead of those in the SQL client.
123+
120124
## Create/drop tables in the upstream
121125

122126
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.

zh/shard-merge-best-practices.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ CREATE TABLE `tbl_no_pk` (
6969
```
7070

7171
2. 在 `task.yaml` 文件中增加如下配置跳过自增主键冲突检查:
72-
72+
7373
```yaml
7474
ignore-checking-items: ["auto_increment_ID"]
7575
```
76-
76+
7777
3. 启动数据迁移任务,执行全量与增量数据迁移。
7878

7979
4. 通过 `query-status` 验证数据迁移任务是否正常,在下游数据库中验证合表中是否已经存在了来自上游的数据。
@@ -116,7 +116,7 @@ CREATE TABLE `tbl_multi_pk` (
116116

117117
## 上游 RDS 封装分库分表的处理
118118

119-
上游数据源为 RDS 且使用了其分库分表功能的情况下,MySQL binlog 中的表名在 SQL client 连接时可能并不可见。例如在 UCloud 分布式数据库 [UDDB](https://www.ucloud.cn/site/product/uddb.html) 中,其 binlog 表名可能会多出 `_0001` 的后缀。这需要根据 binlog 中的表名规律,而不是 SQL client 所见的表名,来配置 [table routing 规则](key-features.md#table-routing)。
119+
上游数据源为 RDS 且使用了其分库分表功能的情况下,MySQL binlog 中的表名在 SQL client 连接时可能并不可见。例如在 UCloud 分布式数据库 [UDDB](https://docs.ucloud.cn/uddb/README) 中,其 binlog 表名可能会多出 `_0001` 的后缀。这需要根据 binlog 中的表名规律,而不是 SQL client 所见的表名,来配置 [table routing 规则](key-features.md#table-routing)。
120120

121121
## 合表迁移过程中在上游增/删表
122122

0 commit comments

Comments
 (0)