-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Spec out the "Simplify Shutdown" project #1894
Comments
Design proposal for cleaning up Source shutdownThe core idea is to change shutdown to be two-phase with regards to shutting down all running Sources. The first phase will be to signal to all Sources to begin shutting down gracefully, and then have the Sources signal back to the shutdown coordinator once their shutdown is complete. The second phase will involve the shutdown coordinator waiting for all Sources to report that their shutdown is complete, or force the Source to shutdown after a given timeout. Code changes to SourcesWe will introduce a new type In order to make it easier for Source implementations to tie the lifetime of the Code changes to TopologyThe
The The Open questions
|
This proposal is largely based on the the POC I built with @LucioFranco's input. @lukesteensen, what do you think? |
Overall this looks great! One question I had is why is the |
Yep, totally agree. I originally designed it that way because back in the oh-so-long-ago time of 2 days ago when I didn't understand how Future combinators worked I thought ShutdownSignal would need to provide direct access to its underlying ShutdownCompleteHandle for the custom shutdown logic in the TCP source to work. Now that I understand future combinators better I think everything we need can be done by combining the ShutdownSignal Future with the other work going on in clever ways. I also think we no longer need the WithHandle combinator I proposed in the design above (though we'll still need to either make our own copy of take_until or commit a change upstream to stream_cancel). I've already made the change to the tcp source in my working copy and it seems pretty straightforward and the abstraction layers look much nicer this way. |
This seems to be done. Nice work. |
As explained in "Plan of attack" section in #1550 (comment), we need to:
This issue should represent those 3 tasks.
The text was updated successfully, but these errors were encountered: