Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
explicitly set EnableHeartbeat to false when create subtasks and upgrade
Browse files Browse the repository at this point in the history
from 1.0
  • Loading branch information
lance6716 committed Mar 1, 2021
1 parent 0ba44df commit 9aca3ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions dm/config/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ func (c *TaskConfig) SubTaskConfigs(sources map[string]DBConfig) ([]*SubTaskConf
cfg.Mode = c.TaskMode
cfg.CaseSensitive = c.CaseSensitive
cfg.MetaSchema = c.MetaSchema
cfg.EnableHeartbeat = false
if c.EnableHeartbeat {
log.L().Warn("DM 2.0 does not support heartbeat feature, will overwrite it to false")
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/v1workermeta/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ func SubTaskConfigFromV1TOML(data []byte) (config.SubTaskConfig, error) {
}

cfg := v1Cfg.SubTaskConfig
// DM v2.0 doesn't support heartbeat, overwrite it to false
cfg.EnableHeartbeat = false
cfg.MydumperConfig.ChunkFilesize = strconv.FormatInt(v1Cfg.ChunkFilesize, 10)
err = cfg.Adjust(true)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions tests/tiup/conf/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: upgrade_via_tiup
task-mode: all
is-sharding: true
enable-heartbeat: true

target-database:
host: tidb
Expand Down

0 comments on commit 9aca3ec

Please sign in to comment.