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

Support exiting of parallel block on first completed task #1261

Closed
gingerwizard opened this issue May 6, 2021 · 2 comments · Fixed by #1305
Closed

Support exiting of parallel block on first completed task #1261

gingerwizard opened this issue May 6, 2021 · 2 comments · Fixed by #1305
Assignees
Labels
enhancement Improves the status quo good first issue Small, contained changes that are good for newcomers :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Milestone

Comments

@gingerwizard
Copy link

The parallel element provides a completed-by property but this only works if the task that should determine the exit condition is known upfront.

The proposal is that that we add a new property e.g. complete-on-first-task-completed. This would cause a parallel block to exit as soon as one task exits.

This is useful when running queries in parallel for example. As soon as one task exits the load reduces overall, invalidating all subsequent executions by other tasks. This would ensure a clean exit.

Note the naming above is a proposal by @danielmitterdorfer only and we're open to suggested better ones.

@gingerwizard gingerwizard added the enhancement Improves the status quo label May 6, 2021
@danielmitterdorfer danielmitterdorfer added the :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. label May 6, 2021
@danielmitterdorfer danielmitterdorfer added this to the 2.2.1 milestone May 6, 2021
@danielmitterdorfer danielmitterdorfer added the good first issue Small, contained changes that are good for newcomers label May 6, 2021
@DJRickyB
Copy link
Contributor

DJRickyB commented May 6, 2021

Has a mixed-type completed-by been considered? an int for number of tasks to end before marking completed or a string for a named task? Having a single parameter vs two that are mutually exclusive makes the natural default behavior (all tasks complete) a little easier to grok, I would think

@danielmitterdorfer
Copy link
Member

Has a mixed-type completed-by been considered?

No, but your proposal made me think whether we should allow the special value any for completed-by with the meaning that whichever task within a parallel block finishes first, completes the entire parallel block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo good first issue Small, contained changes that are good for newcomers :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants