Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reader/sql: improve status check and implement DaemonReader #670

Merged
merged 1 commit into from
Jul 30, 2018
Merged

reader/sql: improve status check and implement DaemonReader #670

merged 1 commit into from
Jul 30, 2018

Conversation

unknwon
Copy link
Contributor

@unknwon unknwon commented Jul 30, 2018

  1. 实现了 DaemonReader 接口
  2. 优化运行状态检查与关闭退出操作
  3. 修复潜在的 submetas data race
  4. 已实测

image

time.Sleep(3 * time.Second)
}
log.Warnf("Runner[%v] %q task execution failed and gave up after 10 tries", r.meta.RunnerName, r.Name())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR


func (r *Reader) hasStopped() bool {
return atomic.LoadInt32(&r.status) == reader.StatusStopped
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

部分 r.status 判断的地方没改全,还是用的 if atomic.LoadInt32(&r.status) == reader.StatusStopping || atomic.LoadInt32(&r.status) == reader.StatusStopped

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改好了

@wonderflow
Copy link
Contributor

LGTM

@wonderflow wonderflow merged commit bf1d119 into qiniu:master Jul 30, 2018
@unknwon unknwon deleted the daemon-reader-start-sql branch July 30, 2018 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants