// CheckCfgCanUpdated check if current subtask config can be updated.
CheckCfgCanUpdated check if current subtask config can be updated.
// CheckCfgCanUpdated check if current subtask config can be updated .
func (w *SourceWorker) CheckCfgCanUpdated(cfg *config.SubTaskConfig) error {
	w.RLock()
	defer w.RUnlock()
	st := w.subTaskHolder.findSubTask(cfg.Name)
	if st == nil {
		return terror.ErrWorkerSubTaskNotFound.Generate(cfg.Name)
	}
	if err := copyConfigFromSource(cfg, w.cfg, w.relayEnabled.Load()); err != nil {
		return err
	}
	return st.CheckUnitCfgCanUpdate(cfg)
}
func ( w * SourceWorker ) CheckCfgCanUpdated ( cfg * config . SubTaskConfig ) error { w . RLock ( ) defer w . RUnlock ( ) st := w . subTaskHolder . findSubTask ( cfg . Name ) if st == nil { return terror . ErrWorkerSubTaskNotFound . Generate ( cfg . Name ) } if err := copyConfigFromSource ( cfg , w . cfg , w . relayEnabled . Load ( ) ) ; err != nil { return err } return st . CheckUnitCfgCanUpdate ( cfg ) }
CheckCfgCanUpdated check if current subtask config can be updated.
CheckCfgCanUpdated check if current subtask config can be updated .
// copy some config item from dm-worker's source config