-
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
Loki: Add a prepare-shutdown
endpoint
#8786
Conversation
ef2d9eb
to
1d0de10
Compare
21abd2d
to
f4977a4
Compare
f4977a4
to
ca41327
Compare
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.
[docs team] Couple of small tweaks requested.
docs/sources/api/_index.md
Outdated
POST /ingester/prepare_shutdown | ||
``` | ||
|
||
`/ingester/prepare_shutdown` will prepare the ingester to release resources on the next SIGTERM, |
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 feel like we should define SIGTERM here.
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.
SIGTERM is a type of signal that a process can receive and is supported by all Unix-based operating systems. Do you think saying SIGTERM signal
is enough here?
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.
LOL, and I have just exposed my UNIX ignorance. But it's also possible that we might have customers in Windows-only environments who could use the information? What do you think?
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.
Sorry, with "could use the information" do you mean the definition of SIGTERM? If so: personally, I feel like this isn't the appropriate place for explaining a concept like SIGTERM, although saying "SIGTERM signal" indeed looked better than just saying "SIGTERM".
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.
OK, let's go with "SIGTERM signal" then.
Co-authored-by: J Stickler <julie.stickler@grafana.com>
@@ -372,6 +372,8 @@ type Loki struct { | |||
deleteClientMetrics *deletion.DeleteRequestClientMetrics | |||
|
|||
HTTPAuthMiddleware middleware.Interface | |||
|
|||
ingesterRelease *atomic.Bool |
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.
Sorry for the late review but is this variable set anywhere?
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.
lol looks like something I was using in an older implementation but forgot to clean, thanks for catching it
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.
yep I was using it in a former implementation
What this PR does / why we need it:
Add a new
/ingester/prepare_shutdown
endpoint. This new endpoint configures the ingester to release resources on the next SIGTERM.