Enhance dataflow stop procedure#1190
Merged
phil-opp merged 6 commits intodora-rs:mainfrom Nov 13, 2025
Merged
Conversation
Collaborator
|
Could add more code documentation on the kill logic with links to the related fixes as it's pretty hard to follow through the code. |
phil-opp
reviewed
Nov 12, 2025
phil-opp
approved these changes
Nov 12, 2025
Collaborator
phil-opp
left a comment
There was a problem hiding this comment.
Looks good to me overall!
Some additonal docs on the CLI force flag would be nice. As I understand it, the normal stop command would wait for the grace duration and then try a soft kill first before doing a hard kill of the whole process group. A force stop would kill the process group directly without waiting. Am I understanding this correctly?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
See the discussion for more details.
This PR implements the three-phase stop procedure described in the discussion. This significantly improves the current state where dataflows are often difficult to stop gracefully.
process-wrapcrate is used to organize processes into groups (process group on Unix and JobObject on Windows). This ensures that all descendant processes are reliably terminated as soon as the root process is killed.Additionally, a
force: boolargument has been added to the stop command, enabling instant process termination. When a dataflow is launched viadora start, pressing Ctrl-C twice will now send a force stop request to the daemon, mirroring the behavior found in Docker.Backward compatibility
The
forceargument has been added to several message types, and#[serde(default)]is used to ensure backward compatibility with existing implementations.