-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat: terminate reduce vertex pods when pausing pipeline #1481
Merged
Conversation
This file contains 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
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
KeranYang
reviewed
Jan 25, 2024
@@ -844,8 +844,13 @@ func (r *pipelineReconciler) scaleVertex(ctx context.Context, pl *dfv1.Pipeline, | |||
scaleTo := replicas | |||
// if vtx does not support autoscaling and min is set, scale up to min |
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.
Suggested change
// if vtx does not support autoscaling and min is set, scale up to min | |
// if replicas equals to 1, it means we are resuming a paused pipeline. | |
// in this case, if a vertex doesn't support auto-scaling, we scale up based on the vertex's configuration: | |
// for a reducer, we scale up to the partition count. | |
// for a non-reducer, if min is set, we scale up to min. |
if !vertex.Scalable() && vertex.Spec.Scale.Min != nil && *vertex.Spec.Scale.Min > 1 { | ||
scaleTo = *vertex.Spec.Scale.Min | ||
if !vertex.Scalable() { | ||
// reduce UDF uses partition count to determine replica count |
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.
Suggested change
// reduce UDF uses partition count to determine replica count |
Signed-off-by: Dillen Padhiar <[email protected]>
KeranYang
approved these changes
Jan 25, 2024
whynowy
approved these changes
Jan 27, 2024
whynowy
pushed a commit
that referenced
this pull request
Feb 11, 2024
Signed-off-by: Dillen Padhiar <[email protected]>
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.
Explain what this PR does.
Fixes #990.
When pausing a pipeline currently, all vertex pods will be determined as
replicas
is set to 0 for each. However, this isn't the case for any reduce vertices as they usepartitions
to determine replicas for the vertex.To remedy this, we change the logic for checking replicas of a reduce vertex to respect
replicas
only if the value is 0. The only case it will be 0 is when the pipeline is paused, otherwise it will respect the partitions value which defaults to 1.