Skip to content
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

Fix shutdown hang in sources on SIGTERM/SIGINT #1718

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

dominiklohmann
Copy link
Member

📔 Description

The new TRANSFORMER actor that always resides in the import process must be shut down when the SOURCE shuts down, as the SOURCE is the sole owner of the TRANSFORMER. Before this change, the DATAGRAM SOURCE shut down the stream of the TRANSFORMER, which caused it to quit somehow, but the SOURCE didn't propagate the shutdown to the TRANSFORMER at all, causing the import process to hang until a repeated SIGTERM/SIGINT led to a hard kill.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

Try locally.

@dominiklohmann dominiklohmann added the bug Incorrect behavior label Jun 15, 2021
@dominiklohmann dominiklohmann requested a review from a team June 15, 2021 10:56
@dominiklohmann dominiklohmann force-pushed the story/ch26423/source-shutdown branch from 75e4174 to f8d2ce1 Compare June 15, 2021 10:57
The new TRANSFORMER actor that always resides in the import process must
be shut down when the SOURCE shuts down, as the SOURCE is the sole owner
of the TRANSFORMER. Before this change, the DATAGRAM SOURCE shut down
the stream of the TRANSFORMER, which caused it to quit somehow, but the
SOURCE didn't propagate the shutdown to the TRANSFORMER at all, causing
the import process to hang until a repeated SIGTERM/SIGINT led to a hard
kill.
@dominiklohmann dominiklohmann force-pushed the story/ch26423/source-shutdown branch from f8d2ce1 to 19fae3d Compare June 15, 2021 14:10
Copy link
Member

@lava lava left a comment

Choose a reason for hiding this comment

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

The change looks correct to me in theory; if you also tested it in practice by sending SIGTERM/SIGINT to a running source this should be good to go.

@dominiklohmann
Copy link
Member Author

if you also tested it in practice by sending SIGTERM/SIGINT

I tested all four combinations of the two signals and running/idle sources.

@dominiklohmann dominiklohmann enabled auto-merge June 15, 2021 14:14
@dominiklohmann dominiklohmann merged commit 4c33d8d into master Jun 15, 2021
@dominiklohmann dominiklohmann deleted the story/ch26423/source-shutdown branch June 15, 2021 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants