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 race with "Increment settledFetches by 1." #119

Open
annevk opened this issue Oct 2, 2018 · 3 comments
Open

Potential race with "Increment settledFetches by 1." #119

annevk opened this issue Oct 2, 2018 · 3 comments

Comments

@annevk
Copy link

annevk commented Oct 2, 2018

Since this is done in parallel, it seems two threads could read settledFetches at a similar time, then increment it locally, and write out the result, leading to it only being incremented once rather than twice.

@jakearchibald
Copy link
Collaborator

I was hoping by using "increment" it would be clear that this should be atomic, but I'm happy to define incrementing using parallel queues.

@annevk
Copy link
Author

annevk commented Oct 2, 2018

Yeah, once we have numbers defined we should really define this in Infra. Atomic makes sense, but if someone needs to increment by 2 and copies this pattern...

@annevk
Copy link
Author

annevk commented Oct 2, 2018

if someone needs to increment by 2

This is pretty much what "complete a record" appears to be doing with "uploaded".

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

No branches or pull requests

2 participants