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

potential for out-of-order versions in scheduler? #8458

Open
sanderr opened this issue Dec 9, 2024 · 0 comments
Open

potential for out-of-order versions in scheduler? #8458

sanderr opened this issue Dec 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sanderr
Copy link
Contributor

sanderr commented Dec 9, 2024

Scheduler._new_version is called whenever a new version is released. It then waits for the intent lock before updating the scheduler's internal state. If two requests come in very shortly after another, I believe it's possible for them to race, one passing an older version to _new_version, while it might still acquire the lock later than the other one.

Solution: move the intent lock one level higher up: drop it from _new_version and add it on new_version and _initialize instead, before fetching the latest version from the database. This ensures monotonically increasing versions to the _new_version call.

@sanderr sanderr added the bug Something isn't working label Dec 9, 2024
@sanderr sanderr self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant