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

Commit

Permalink
fix: update saved task config when restarting DM-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc committed Jun 16, 2020
1 parent 8da96c8 commit e477779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dm/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ func (w *Worker) restoreSubTask() error {
return terror.Annotatef(err, "decode subtask config %s error in restoreSubTask", task.Task)
}

// when restarting DM-worker, some config items may need to be updated for the previous saved task config.
w.copyConfigFromWorker(taskCfg)

cfgDecrypted, err := taskCfg.DecryptPassword()
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions tests/sequence_sharding/conf/dm-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ task-mode: all
is-sharding: true
meta-schema: "dm_meta"
remove-meta: false
enable-heartbeat: true
timezone: "Asia/Shanghai"

target-database:
Expand Down

0 comments on commit e477779

Please sign in to comment.