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

Do not use WaitGroup context for StepEvaluator #5425

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

cyriltovena
Copy link
Contributor

What this PR does / why we need it:

When we introduce parallelism in binops, we use a waitGroup but once we have waited it cancel the context and so when iterating it would actually stop right away.

This handle the cancellation in case of mutual failure manually and use the wait group without the context.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

@cyriltovena cyriltovena requested a review from a team as a code owner February 18, 2022 15:03
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Is there a way we can test this? Or is it covered by existing tests?

Copy link
Collaborator

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

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

Nice find. :).

Do you think worth adding test for that cancel()?

@cyriltovena
Copy link
Contributor Author

Yeah we can add a tests, I wasn't sure if it was worth the investment because it's a bit tricky but doable.

If we think we want it strongly I'll add it.

@owen-d owen-d merged commit 07e5eb3 into grafana:main Feb 18, 2022
@kavirajk kavirajk mentioned this pull request Feb 18, 2022
3 tasks
kavirajk added a commit that referenced this pull request Feb 18, 2022
* Correctly sets hash value for headblock iterator (#5423)

* Do not use WaitGroup context for StepEvaluator (#5425)

Co-authored-by: Cyril Tovena <cyril.tovena@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants