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

Fix panic due to error in HasWork #2456

Merged
merged 2 commits into from
Mar 25, 2022
Merged

Conversation

mstoykov
Copy link
Contributor

@mstoykov mstoykov commented Mar 24, 2022

The panic was happening in the Init but it was due to the fact that
HasWork wrongfully returned True when it should've returned false.

Changelog entry:

Fixed a very unlikely panic involving arrival rate executors and execution segments with very low VU counts. 

@mstoykov mstoykov requested review from imiric and na-- March 24, 2022 10:44
@mstoykov mstoykov added this to the v0.38.0 milestone Mar 24, 2022
The panic was happening in the `Init` but it was due to the fact that
HasWork wrongfully returned True when it should've returned false.
@mstoykov mstoykov force-pushed the fixPanicsWithExecutionSegments branch from 211b462 to 029f6f5 Compare March 24, 2022 10:49
@mstoykov
Copy link
Contributor Author

While this is fixing the particular case that we know of, there are other places where Scale Is used.

I have trouble remembering why we decided to leave both given that segment.Scale has known problems with splitting work 🤔

@mstoykov
Copy link
Contributor Author

I can't find any discussion about the topic :( but here is a PR (based on this one) that removes the Segment.Scale and not test fail so 🤷 Maybe it's good idea to have only one implementation ...

Most executors use that already and while ExecutionSegment.Scale gives
the same result in a lot of cases - it doesn't in some. This potentially
can lead to small (1 VU/iteration) discrepancies but more importantly
panics. Especially in cases where the differences are when one returns a
0 and the other a 1 for a given value.
Copy link
Member

@na-- na-- 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 mstoykov requested review from olegbespalov and removed request for imiric March 25, 2022 09:19
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.

LGTM

@mstoykov mstoykov merged commit 6120f37 into master Mar 25, 2022
@mstoykov mstoykov deleted the fixPanicsWithExecutionSegments branch March 25, 2022 09:45
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.

3 participants