-
-
Notifications
You must be signed in to change notification settings - Fork 95
Eliminate signal monitoring shutdown lag #2807
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
Eliminate signal monitoring shutdown lag #2807
Conversation
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.
The current approach does not exit gracefully for me.
9ce7c27
to
b89cb1f
Compare
This replaces the signal monitor with an adapter approach that translates POSIX signals into CAF messages. The feature is intentionally limited to SIGINT and SIGTERM and should always lead to termination. Other signals are not supported in order to avert the temptation of using signals for poor mans IPC.
Instead of sending a signal to the process we use the `pthread_cancel` function. This works because the `sigwait` is a cancelation point.
With the faster termination thanks to the new signal handling logic the symptoms of the not quite working blocking import become much more pronounced. This is especially problematic for the integration tests which rely on blocking import a lot. In order to preserve the blocking semantic the flag now implies a flush to disk of in memory data. This ensures that active partitions are written to disk and added catalog before the command returns.
cdd7cd0
to
ebda73a
Compare
macOS CI fails because it doesn't have |
Homebrew libc++ doesn't have it, so you'll have to use |
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 still sometimes see the 30s delay in the integration tests:
2022-12-21 10:38:28 DEBUG stopping server fixture: [PosixPath('/Users/dominiklohmann/Desktop/vast/master/build/bin/vast'), '--bare-mode', '--config=/Users/dominiklohmann/Desktop/vast/master/plugins/web/integration/vast.yaml', '-e', ':42024', 'stop']
2022-12-21 10:38:59 INFO ran all 5 steps successfully
For the remainder, I left some questions, but I think this is mostly ready to go. Works nicely locally.
Co-authored-by: Dominik Lohmann <mail@dominiklohmann.de>
We identified this to be a separate bug specific to the |
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.
Approving modulo the ongoing open discussions.
I enabled auto-merge here since this was really annoying over the past few weeks and shouldn't be blocking further work while most of everyone is on vacation. |
This fixes a bug that was only surfaced by #2807, so it's not really worth a separate changelog entry.
This fixes a bug that was only surfaced by #2807, so it's not really worth a separate changelog entry.
This replaces the signal monitor with an adapter approach that translates POSIX signals into CAF messages.
The feature is intentionally limited to SIGINT and SIGTERM and should always lead to termination. Other signals are not supported in order to avert the temptation of using signals for poor mans IPC.
To the reviewer:
CTRL-C
.CTRL-C
but can be terminated immediately with a secondCTRL-C
.-N
option exit regularly upon completion.