-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat: also gracefully shutdown on SIGTERM #17802
Conversation
src/utils/runtime/src/lib.rs
Outdated
@@ -96,24 +97,26 @@ where | |||
spawn_prof_thread(profile_path); | |||
} | |||
|
|||
let mut sigint = tokio::signal::unix::signal(SignalKind::interrupt()).unwrap(); |
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.
We don't support Windows, so directly use unix
-only features here.
74a5dbe
to
fc9d5cd
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @BugenZhao and the rest of your teammates on Graphite |
fc9d5cd
to
c36de8a
Compare
8c20bad
to
4dcfb9d
Compare
d0515b1
to
6188e69
Compare
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
6188e69
to
766b0b0
Compare
// Watch SIGINT, typically originating from user pressing ctrl-c. | ||
// Attempt to shutdown gracefully and force shutdown on the next signal. | ||
_ = sigint.recv() => { | ||
tracing::info!("received ctrl-c, shutting down... (press ctrl-c again to force shutdown)"); |
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.
👍
Tested with compute:
meta:
|
cc. @arkbriar |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
...because Kubernetes will send
SIGTERM
when killing a pod.As described in #17662, this can empower more seamless scaling-in in Kubernetes deployments. (correct me if I'm wrong)
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
The step 1 of manual unregistration of the compute node when scaling-in (doc) is not necessary any more. Users can directly apply the new yaml file to trigger a graceful scale-in.