-
-
Notifications
You must be signed in to change notification settings - Fork 96
Stop accepting new queries after initiating shutdown #2215
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
Conversation
Before this change, the index continued accepting queries after initiating shutdown, which could lead to an infinite hang because queries were coming in faster than the index was able to process them.
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 got a live demo that the fix works.
The sink command must link itself to the exporter until it knows that the exporter monitors the sink command's scoped actor in order to avoid a dead window where ungraceful exits of the sink command leave dangling exporter actors in the VAST server.
@tobim I've re-requested your review after the last two commits. |
e728d96
to
9f44023
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.
Before we accept this additional complexity, can we test whether bidirectional linkage between all 3 actors would work? I mean the sink command calls self->link_to(snk)
and self->link_to(exporter)
, and the exporter links itself to the sink? The rest of the lifetime management in the sink command can probably ripped out.
It does work, but we lose the ability to give a good exit code and error message if there's an unexpected shutdown. So I think listening for down messages is still preferred. |
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 can see that this resolves a timing issue with early shutdowns or crashes of the sink process. We should evaluate a solution based on the remote spawn functionality in CAF 0.18 once we are able to upgrade.
Before this change, the index continued accepting queries after initiating shutdown, which could lead to an infinite hang because queries were coming in faster than the index was able to process them.
📝 Checklist
🎯 Review Instructions
Try locally: