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

Ensure uniqueness of steal stimulus ID #5620

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

fjetter
Copy link
Member

@fjetter fjetter commented Dec 21, 2021

The stimulus ID is used to verify worker responses to distinguish
concurrently running steal requests. The windows clock in particular is
not strictly monotonic which caused duplicates in this test setup.

For real life scenarios this race is so incredibly unlikely that I don't expect to see it in the wild.

The UUID is about three times slower but I don't think this should be a performance problem.

Might address #5494

xref #5379

The stimulus ID is used to verify worker responses to distinguish
concurrently running steal requests. The windows clock in particular is
not strictly monotonic which caused duplicates in this test setup.
async def test_steal_stimulus_id_unique(c, s, *workers):
steal = s.extensions["stealing"]
num_futs = 1_000
from distributed import Lock
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be at the top of the module

@jrbourbeau
Copy link
Member

rerun tests

1 similar comment
@jrbourbeau
Copy link
Member

rerun tests

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Just pushed a commit to address @crusaderky's feedback -- will merge after CI finishes up

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