-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Notify workers of quick shutdown after graceful shutdown times out. #3388
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
base: master
Are you sure you want to change the base?
Conversation
As per benoitc#3385 this allows to distinguish between graceful and abnormal termination and gives a chance to workers to do something about it (e.g. to log a stack trace). For backward compatibility, we keep the old 2 signals model if quick_shutdown_timeout is set to 0.
|
I like it, completely alleviates the concern that people might have depended on the previous behavior. Note to reviewers: This patch carefully retains two questionable behaviors, which should probably be changed separately:
However:
|
|
interesting try! |
|
You requested a review, but I have nothing substantial to add. It appears to work as intended, and whatever could be improved can safely be done so in separate merges. e.g. I would recommend eventually changing:
My naive approach at doing both introduces more ways to create unexpected behavior when actually using very small values for the 3 timeouts, so maybe that is something easier to get right after applying something like #3148. |
In the previous commit, I changed that signal from SIGQUIT to SIGINT without apparent reason. Either should work as they are meant to be used the same way for the same purpose. Still, there was no reason to change so let's revert.
Follow up on benoitc@ebe313f
As per #3385 this allows to distinguish between graceful and abnormal termination and gives a chance to workers to do something about it (e.g. to log a stack trace).
For backward compatibility, we keep the old 2 signals model if quick_shutdown_timeout is set to 0.