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

Allow parallel tasks to exit on any completion #1305

Merged
merged 11 commits into from
Aug 11, 2021

Conversation

b-deam
Copy link
Member

@b-deam b-deam commented Jul 19, 2021

With this commit we add the ability to specify a new any value
for the completed-by param for parallel task blocks. This
allows the parallel block to be completed by whichever task is
first to complete successfully.

Closes #1261

Tested with track:

{
  "description": "'any' testing ",
  "challenges": [
    {
      "name": "parallel-any",
      "description": "Track completed-by property",
      "schedule": [
        {
          "name": "outside-cluster-health",
          "operation": {
            "operation-type": "cluster-health"
          }
        },
        {
          "parallel": {
            "completed-by": "any",
            "tasks": [
              {
                "name": "check-cluster-health",
                "operation": {
                  "operation-type": "cluster-health"
                }
              },
              {
                "name": "run-node-stats",
                "operation": {
                  "operation-type": "node-stats"
                },
                "iterations": 300000000
              }
            ]
          }
        }
      ]
    }
  ]
}

@b-deam b-deam self-assigned this Jul 19, 2021
@b-deam b-deam added :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. enhancement Improves the status quo feedback needed An open question blocks progress labels Jul 19, 2021
@b-deam b-deam added this to the 2.3.0 milestone Jul 19, 2021
Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I left a few suggestions. IMHO also a test for the track loader is missing.

@b-deam b-deam marked this pull request as ready for review August 9, 2021 04:41
@b-deam
Copy link
Member Author

b-deam commented Aug 10, 2021

I think I addressed the comments, can you take a look when you get a chance?

Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating. I left one nit but other than that LGTM. No need for another review round.

@danielmitterdorfer danielmitterdorfer removed the feedback needed An open question blocks progress label Aug 10, 2021
@b-deam b-deam merged commit 4c6edf8 into elastic:master Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support exiting of parallel block on first completed task
3 participants