Skip to content

Conversation

@thevaibhav-dixit
Copy link

Fixes #51

@Diggsey
Copy link
Owner

Diggsey commented Mar 18, 2024

Thanks for the PR! I think this kind of change should be accompanied by a regression test though.

@bodymindarts
Copy link

bodymindarts commented Mar 18, 2024

Not sure how best to go about reproducing this locally. In the production environment we observed this we spawned ~200 jobs and had 2 workers running to get through the queue. Before this fix we consistently saw duplicate job_ids... now none anymore.

Do you have a tip on how you would go about testing this?

@Diggsey
Copy link
Owner

Diggsey commented Mar 18, 2024

I would probably spawn a large number of jobs, and then start N threads, and have them all wait on a Barrier to make sure they are properly synchronized, before having them all simultaneously start the job runner.
If the same job is picked up twice, panic.
Rinse and repeat M times, where M is large enough to reliably reproduce the issue.

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.

Duplicate Spawning of Jobs

3 participants