Skip to content

Commit

Permalink
dm: add dm task timezone config (#8159)
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv committed Jan 17, 2022
1 parent 561eb10 commit 3755075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dm/dm-task-configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ shard-mode: "pessimistic" # 默认值为 "" 即无需协调。如果为分
name: test # 任务名称,需要全局唯一
shard-mode: "pessimistic" # 默认值为 "" 即无需协调。如果为分库分表合并任务,请设置为悲观协调模式 "pessimistic"。在深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
task-mode: all # 任务模式,可设为 "full" - "只进行全量数据迁移"、"incremental" - "Binlog 实时同步"、"all" - "全量 + Binlog 迁移"
# timezone: "UTC" # 指定数据迁移任务时 SQL Session 使用的时区。DM 默认使用目标库的全局时区配置进行数据迁移,并且自动确保同步数据的正确性。使用自定义时区依然可以确保整个流程的正确性,但一般不需要手动指定。
## ******** 数据源配置 **********
mysql-instances:
Expand Down
3 changes: 2 additions & 1 deletion dm/task-configuration-file-full.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ is-sharding: true # 该配置项从 DM v2.0.0 起弃用,其功
shard-mode: "pessimistic" # 任务协调模式,可选的模式有 ""、"pessimistic、"optimistic"。默认值为 "" 即无需协调。如果是分库分表合并任务,请设置为悲观协调模式 "pessimistic"。
# 在 v2.0.6 版本后乐观模式逐渐成熟,深入了解乐观协调模式的原理和使用限制后,也可以设置为乐观协调模式 "optimistic"
meta-schema: "dm_meta" # 下游储存 `meta` 信息的数据库
timezone: "Asia/Shanghai" # 时区
# timezone: "Asia/Shanghai" # 指定数据迁移任务时 SQL Session 使用的时区。DM 默认使用目标库的全局时区配置进行数据迁移,并且自动确保同步数据的正确性。使用自定义时区依然可以确保整个流程的正确性,但一般不需要手动指定。

case-sensitive: false # schema/table 是否大小写敏感
online-ddl: true # 支持上游 "gh-ost" 、"pt" 的自动处理
online-ddl-scheme: "gh-ost" # `online-ddl-scheme` 在未来将会被弃用,建议使用 `online-ddl` 代替 `online-ddl-scheme`
Expand Down

0 comments on commit 3755075

Please sign in to comment.