Skip to content

Leave Server module running until end of shutdown#1463

Merged
csmarchbanks merged 2 commits intomasterfrom
stop-server-later
Jun 12, 2019
Merged

Leave Server module running until end of shutdown#1463
csmarchbanks merged 2 commits intomasterfrom
stop-server-later

Conversation

@bboreham
Copy link
Contributor

Fixes #1447

We want the process to answer requests (including status and metrics) until it has finished shutting down.

Every target depends on Server, so it will get shut down as a dependency.

We want the process to answer requests (including status and metrics)
until it has finished shutting down.

Every target depends on Server, so it will get shut down as a dependency.

Signed-off-by: Bryan Boreham <bryan@weave.works>
Copy link
Contributor

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

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

LGTM, one small comment that I do not feel too strongly about.

// Stop gracefully stops a Cortex.
func (t *Cortex) Stop() error {
t.server.Shutdown()
t.stop(t.target)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just inline the implementation of t.stop now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've done that - it hadn't occurred to me, but it is shorter.

Signed-off-by: Bryan Boreham <bryan@weave.works>
@bboreham bboreham force-pushed the stop-server-later branch from 39e3c6d to 473b333 Compare June 12, 2019 14:10
@csmarchbanks csmarchbanks merged commit fe16b2b into master Jun 12, 2019
@gouthamve gouthamve deleted the stop-server-later branch June 12, 2019 15:36
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.

Ingester refusing grpc connections during hand-over

2 participants