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

TP2000-1577 Correct usage of select_for_update() in packaged workbasket instance methods #1358

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dalecannon
Copy link
Contributor

@dalecannon dalecannon commented Dec 13, 2024

TP2000-1577 Correct usage of select_for_update() in packaged workbasket instance methods

Why

There's been a couple occurrences of the packaging queue becoming stuck as a consequence of packaged workbasket positions being duplicated or out-of-sequence following reordering.

What

  • Evaluates querysets that rely on select_for_update() to ensure rows are locked
  • Adds TestPackagingQueueRaceConditions test class that uses concurrent threads to check race conditions have been sufficiently guarded against

Links to relevant material
See: Django docs: select_for_update()
See: Jupyter notebook exploring the usage of select_for_update()

@dalecannon dalecannon force-pushed the TP2000-1577--packaging-queue-race-condition branch from d638ca0 to d1ebd48 Compare December 15, 2024 20:34
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.

1 participant