Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion en/feature-online-ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In the task configuration file, `online-ddl` is at the same level of `name`. For
## ********* Basic configuration *********
name: test # The name of the task. Should be globally unique.
task-mode: all # The task mode. Can be set to `full`/`incremental`/`all`.
shard-mode: "pessimistic" # You need to configure this if it is a shard merge task. The "pessimistic" mode is used by default. After understanding the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
shard-mode: "pessimistic" # The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default which means sharding DDL merge is disabled. If the task is a shard merge task, set it to the "pessimistic" mode. After understanding the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
meta-schema: "dm_meta" # The downstream database that stores the `meta` information.
online-ddl: true # Supports automatic processing of "gh-ost" and "pt" for the upstream database.
online-ddl-scheme: "gh-ost" # `online-ddl-scheme` will be deprecated in the future, so it is recommended to use `online-ddl`.
Expand Down
4 changes: 2 additions & 2 deletions en/key-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ Currently, the shard merge feature is supported only in limited scenarios. For d

### Parameter configuration

Set `is-sharding` to `true` in the task configuration file:
Set `shard-mode` to `pessimistic` in the task configuration file:

```
shard-mode: "pessimistic" # You need to configure this if it is a shard merge task. The "pessimistic" mode is used by default. After understanding the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
shard-mode: "pessimistic" # The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default which means sharding DDL merge is disabled. If the task is a shard merge task, set it to the "pessimistic" mode. After getting a deep understanding of the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
```

### Handle sharding DDL locks manually
Expand Down
3 changes: 2 additions & 1 deletion en/task-configuration-file-full.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ The following is the task configuration file template which allows you to perfor
## ********* Basic configuration *********
name: test # The name of the task. Should be globally unique.
task-mode: all # The task mode. Can be set to `full`(only migrates full data)/`incremental`(replicates binlogs synchronously)/`all` (replicates both full data and incremental binlogs).
shard-mode: "pessimistic" # The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default which means no specific mode is required. If the task is a shard merge task, set it to the "pessimistic" mode.
is-sharding: true # `is-sharding` has been deprecated since v2.0.0, so it is recommended to directly use `shard-mode`
shard-mode: "pessimistic" # The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default which means sharding DDL merge is disabled. If the task is a shard merge task, set it to the "pessimistic" mode.
# After understanding the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
meta-schema: "dm_meta" # The downstream database that stores the `meta` information.
timezone: "Asia/Shanghai" # The timezone.
Expand Down
4 changes: 2 additions & 2 deletions en/task-configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ The following example shows how to configure the task as a shard merge task:

## ********* Basic information *********
name: test # The name of the task. Should be globally unique.
shard-mode: "pessimistic" # The shard-mode must be configured for a shard merge task. By default, use the "pessimistic" mode. After getting a deep understanding of the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
shard-mode: "pessimistic" # The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default which means sharding DDL merge is disabled. If the task is a shard merge task, set it to the "pessimistic" mode. After getting a deep understanding of the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
```

## Other configurations
Expand All @@ -193,7 +193,7 @@ The following is an overall task configuration example of this document. The com

## ********* Basic configuration *********
name: test # The name of the task. Should be globally unique.
shard-mode: "pessimistic" # The shard-mode must be configured for a shard merge task. By default, use the "pessimistic" mode. After getting a deep understanding of the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
shard-mode: "pessimistic" # The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default which means sharding DDL merge is disabled. If the task is a shard merge task, set it to the "pessimistic" mode. After getting a deep understanding of the principles and restrictions of the "optimistic" mode, you can set it to the "optimistic" mode.
task-mode: all # The task mode. Can be set to `full`(only migrates full data)/`incremental`(replicates binlog synchronously)/`all` (replicates both full and incremental binlogs).

## ******** Data source configuration **********
Expand Down
2 changes: 1 addition & 1 deletion zh/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ DM 在最后 `rename ghost_table to origin table` 的步骤会把内存的 DDL

## DM v2.0.0 启动任务时出现 `fail to initial unit Sync of subtask`,报错信息的 `RawCause` 显示 `context deadline exceeded`

该问题是 DM v2.0.0 版本的已知问题,在同步任务的表数目较多时触发,将在 v2.0.1 修复。使用 TiUP 部署的用户可以升级到开发版 nightly 解决该问题,或者访问 GitHub 上 [DM 仓库的 release 页面](https://github.com/pingcap/ticdc/releases)下载 v2.0.0-hotfix 版本手动替换可执行文件。
该问题是 DM v2.0.0 的已知问题,在同步任务的表数目较多时触发,将在 v2.0.1 修复。使用 TiUP 部署的用户可以升级到开发版 nightly 解决该问题,或者访问 GitHub 上 [DM 仓库的 release 页面](https://github.com/pingcap/ticdc/releases)下载 v2.0.0-hotfix 版本手动替换可执行文件。

## DM 同步中报错 `duplicate entry`

Expand Down
2 changes: 1 addition & 1 deletion zh/feature-online-ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ online-ddl 在 task 配置文件里面与 name 同级,例子详见下面配置
## ********* 基本信息配置 *********
name: test # 任务名称,需要全局唯一
task-mode: all # 任务模式,可设为 "full"、"incremental"、"all"
shard-mode: "pessimistic" # 如果为分库分表合并任务则需要配置该项。默认使用悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
shard-mode: "pessimistic" # 默认值为 "" 即无需协调。如果为分库分表合并任务,请设置为悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
meta-schema: "dm_meta" # 下游储存 `meta` 信息的数据库
online-ddl: true # 支持上游使用 gh-ost 、pt 两种工具的自动处理
online-ddl-scheme: "gh-ost" # `online-ddl-scheme` 在未来将被弃用,建议使用 `online-ddl`
Expand Down
2 changes: 1 addition & 1 deletion zh/key-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ DM 支持将上游 MySQL/MariaDB 各分库分表中的 DML、DDL 数据合并后
在 task 的配置文件中设置:

```
shard-mode: "pessimistic" # 如果为分库分表合并任务则需要配置该项。默认使用悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
shard-mode: "pessimistic" # 默认值为 "" 即无需协调。如果为分库分表合并任务,请设置为悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
```

### 手动处理 Sharding DDL Lock
Expand Down
9 changes: 5 additions & 4 deletions zh/task-configuration-file-full.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ aliases: ['/docs-cn/tidb-data-migration/dev/task-configuration-file-full/','/zh/
## ********* 基本信息配置 *********
name: test # 任务名称,需要全局唯一
task-mode: all # 任务模式,可设为 "full" - "只进行全量数据迁移"、"incremental" - "Binlog 实时同步"、"all" - "全量 + Binlog 实时同步"
shard-mode: "pessimistic" # 任务协调模式,可选的模式有 ""、"pessimistic、"optimistic"。默认使用 "" 即无需协调。如果是分库分表合并任务,请设置为悲观协调模式 "pessimistic"。
is-sharding: true # 该配置项从 DM v2.0.0 起弃用,其功能被 `shard-mode` 取代,建议使用 `shard-mode` 代替 `is-sharding`
shard-mode: "pessimistic" # 任务协调模式,可选的模式有 ""、"pessimistic、"optimistic"。默认值为 "" 即无需协调。如果是分库分表合并任务,请设置为悲观协调模式 "pessimistic"。
# 在 v2.0.6 版本后乐观模式逐渐成熟,深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
meta-schema: "dm_meta" # 下游储存 `meta` 信息的数据库
timezone: "Asia/Shanghai" # 时区
Expand All @@ -39,10 +40,10 @@ target-database: # 下游数据库实例配置
user: "root"
password: "/Q7B9DizNLLTTfiZHv9WoEAKamfpIUs=" # 推荐使用经 `dmctl encrypt` 加密后的密码
max-allowed-packet: 67108864 # 设置 DM 内部连接 TiDB 服务器时,TiDB 客户端的 "max_allowed_packet" 限制(即接受的最大数据包限制),单位为字节,默认 67108864 (64 MB)
# 该配置项从 DM v2.0.0 版本起弃用,DM 会自动获取连接 TiDB 的 "max_allowed_packet"
# 该配置项从 DM v2.0.0 起弃用,DM 会自动获取连接 TiDB 的 "max_allowed_packet"
session: # 设置 TiDB 的 session 变量,在 v1.0.6 版本引入。更多变量及解释参见 `https://docs.pingcap.com/zh/tidb/stable/system-variables`
sql_mode: "ANSI_QUOTES,NO_ZERO_IN_DATE,NO_ZERO_DATE" # 从 DM v2.0.0 版本起,如果配置文件中没有出现该项,DM 会自动从下游 TiDB 中获得适合用于 "sql_mode" 的值。手动配置该项具有更高优先级
tidb_skip_utf8_check: 1 # 从 DM v2.0.0 版本起,如果配置文件中没有出现该项,DM 会自动从下游 TiDB 中获得适合用于 "tidb_skip_utf8_check" 的值。手动配置该项具有更高优先级
sql_mode: "ANSI_QUOTES,NO_ZERO_IN_DATE,NO_ZERO_DATE" # 从 DM v2.0.0 ,如果配置文件中没有出现该项,DM 会自动从下游 TiDB 中获得适合用于 "sql_mode" 的值。手动配置该项具有更高优先级
tidb_skip_utf8_check: 1 # 从 DM v2.0.0 ,如果配置文件中没有出现该项,DM 会自动从下游 TiDB 中获得适合用于 "tidb_skip_utf8_check" 的值。手动配置该项具有更高优先级
tidb_constraint_check_in_place: 0
security: # 下游 TiDB TLS 相关配置
ssl-ca: "/path/to/ca.pem"
Expand Down
4 changes: 2 additions & 2 deletions zh/task-configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ target-database: # 目标 TiDB 配置

## ********* 任务信息配置 *********
name: test # 任务名称,需要全局唯一
shard-mode: "pessimistic" # 如果为分库分表合并任务则需要配置该项。默认使用悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
shard-mode: "pessimistic" # 默认值为 "" 即无需协调。如果为分库分表合并任务,请设置为悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
```

## 其他配置
Expand All @@ -174,7 +174,7 @@ shard-mode: "pessimistic" # 如果为分库分表合并任务则需要配

## ********* 任务信息配置 *********
name: test # 任务名称,需要全局唯一
shard-mode: "pessimistic" # 如果为分库分表合并任务则需要配置该项。默认使用悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
shard-mode: "pessimistic" # 默认值为 "" 即无需协调。如果为分库分表合并任务,请设置为悲观协调模式 "pessimistic"在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
task-mode: all # 任务模式,可设为 "full" - "只进行全量数据迁移"、"incremental" - "Binlog 实时同步"、"all" - "全量 + Binlog 迁移"

## ******** 数据源配置 **********
Expand Down