Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 authored and ti-chi-bot committed Dec 29, 2021
1 parent 1a5c690 commit 0256f9a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions dm/dm/master/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,20 +813,6 @@ func (s *Scheduler) AddSubTasks(latched bool, cfgs ...config.SubTaskConfig) erro
m[stage.Source] = stage
}

// 6. check if we can resolve load task by scheduling the source to the worker which has dump files on local disk.
for _, cfg := range newCfgs {
source := cfg.SourceID
worker, ok := s.bounds[source]
if !ok {
continue
}

if err2 := s.tryResolveLoadTask(worker.BaseInfo().Name, source); err2 != nil {
s.logger.Error("in AddSubTasks, error when try resolve load task",
zap.String("worker", worker.BaseInfo().Name),
zap.String("source", source))
}
}
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion dm/tests/load_task/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function stop_task_left_load() {
"query-status load_task1" \
"different worker in load stage, previous worker: worker1, current worker: worker2" 1

# now left a load_task KV in etcd
# now stop this task without clean meta (left a load_task KV in etcd)
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"stop-task load_task1" \
"\"result\": true" 2
Expand Down

0 comments on commit 0256f9a

Please sign in to comment.