Skip to content

Only wait for other modules if underlying service is still running.#2547

Merged
pstibrany merged 1 commit intocortexproject:masterfrom
pstibrany:module-service
Apr 30, 2020
Merged

Only wait for other modules if underlying service is still running.#2547
pstibrany merged 1 commit intocortexproject:masterfrom
pstibrany:module-service

Conversation

@pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Apr 30, 2020

What this PR does: While reviewing #2542, I've realized there is a small issue in moduleService: it waits for other modules to stop, even if underlying service is already stopping or terminated. This PR fixes that. It doesn't change much: it will log module error earlier, and transition to Terminated/Failed state faster. More importantly, I think it makes intent of the code clearer.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Otherwise there is no point in waiting.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

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

LGTM

@pstibrany pstibrany merged commit ef8dc06 into cortexproject:master Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants