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

Add test for race in PushIfNotDone #4082

Closed
wants to merge 2 commits into from
Closed

Conversation

mstoykov
Copy link
Contributor

What?

Why?

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

@mstoykov mstoykov requested a review from a team as a code owner November 29, 2024 15:51
@mstoykov mstoykov requested review from oleiade and olegbespalov and removed request for a team November 29, 2024 15:51
Copy link
Member

@oleiade oleiade left a comment

Choose a reason for hiding this comment

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

Nice catch! 🚀

Copy link
Contributor

@olegbespalov olegbespalov left a comment

Choose a reason for hiding this comment

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

Waiting for actual fix, or closing the PR

Copy link
Contributor

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@mstoykov
Copy link
Contributor Author

This was a PR to illustrate that there is no way for the current PushIfNotDOne to not race with the context done and channel close.

The thing is that in the current code there is no place where the channel gets closed before every VU has returned so nothing should be using this - which is signaled with the context close.

The "real" fix for this will be to not use close the channel, but that is already used in some places, so it is way more involved.

Again in practice this should never happen - if it does it is a bug in the other code.

@mstoykov mstoykov closed this Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants