-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
start and stop modules in correct order #285
Conversation
When starting up, start all dependencies first then start the target module. When stopping, reverse the order to ensure we dont try and stop a module while there is still something running that needs it. fixes #105
3c82807
to
ab13a69
Compare
pkg/loki/loki.go
Outdated
} | ||
delete(t.inited, m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the inited
field can be removed completely from the Loki struct
pkg/loki/modules.go
Outdated
uniq[dep] = false | ||
} | ||
|
||
result := make([]moduleName, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do []moduleName{}
or make([]moduleName, 0, len(uniq)
. Anything but this!
LGTM with 2 nits. |
[release-5.7] Improve validation of provided S3 storage configuration
When starting up, start all dependencies first then start the target
module. When stopping, reverse the order to ensure we dont try and
stop a module while there is still something running that needs it.
fixes #105