-
Notifications
You must be signed in to change notification settings - Fork 318
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
scheduler.start state need to be set only at the end of the start() function #4
Comments
Hi, maybe you could describe in detail. |
scheduler.go line 102 has to be put to the end of the start function, because scheduler actually has not been fully started yet at that time. Downloader, analyzer are all not initialized. However, monitor is waiting for this stat change and will query those components afterwards. So there will be a risk condition when those initializing components are queried by the monitor. |
OK, sometimes there will be a problem, although it seems had little effect. What do you do to improve it? Welcome to send PR. :-) In fact, it's to prevent repeated start. |
@lzl1024 You are right.
|
Otherwise, monitor might start running before scheduler is fully started and query those components which are not initialized. It will run into a panic.
The text was updated successfully, but these errors were encountered: