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

Start receiving from queue only once we got all inflight executions. #269

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

fische
Copy link
Contributor

@fische fische commented Nov 10, 2023

This should fix a potential data race when we initialise the internal job cache. We used to start receiving from the queue first and then fetch the list of inflight executions to fill the internal job cache. The first uses a mutex to write to the cache but not the second. There are 2 solutions, either we keep the same order of doing things and we make sure to lock the mutex when filling the cache with inflight executions, or we just start receiving after initialising the cache. The latter seems safer to me, which is why I went for that solution.

@fische fische self-assigned this Nov 10, 2023
ChangeLog Outdated Show resolved Hide resolved
@fische fische merged commit f719b93 into thought-machine:master Nov 14, 2023
5 checks passed
@fische fische deleted the fix-initialisation branch November 14, 2023 14:24
Hamishpk pushed a commit to Hamishpk/please-servers that referenced this pull request Mar 7, 2024
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.

4 participants