-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(ludicrous): Fix data race in executor #7203
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this fix the crash we saw @ahsanbarkati ?
worker/executor.go
Outdated
| atomic.AddInt64(&dependent.inDeg, -1) | ||
| if atomic.LoadInt64(&dependent.inDeg) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| atomic.AddInt64(&dependent.inDeg, -1) | |
| if atomic.LoadInt64(&dependent.inDeg) == 0 { | |
| if atomic.AddInt64(&dependent.inDeg, -1) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been running fine since last night. I think this will fix the crash. I'll let it run for a day or two.
|
Can you please add a brief description in PR description about why this should be atomic? |
The operations on inDeg field of mutation struct should be done atomically because it is being used to check if a mutation in dependent on any other mutation. And the mutations are run concurrently, so this update/read on inDeg should be protected.
The operations on inDeg field of mutation struct should be done atomically because it is being used to check if a mutation in dependent on any other mutation. And the mutations are run concurrently, so this update/read on inDeg should be protected. (cherry picked from commit 49fd1f4)
The operations on inDeg field of mutation struct should be done atomically because it is being used to check if a mutation in dependent on any other mutation. And the mutations are run concurrently, so this update/read on inDeg should be protected. (cherry picked from commit 49fd1f4)
The operations on inDeg field of mutation struct should be done atomically because it is being used to check if a mutation in dependent on any other mutation. And the mutations are run concurrently, so this update/read on inDeg should be protected. (cherry picked from commit 49fd1f4)
The operations on
inDegfield ofmutationstruct should be done atomically because it is being used to check if a mutation in dependent on any other mutation. And the mutations are run concurrently, so this update ininDegshould be protected. This change fixes the data race which results in alpha crash due to callingDoneon watermark which is lesser thandoneUntilPotential fix for: DGRAPH-2805
This change is