-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Races while running flock #3685
Comments
I am not sure if this is dgraph issue or flock issue.
|
Data Race 1
|
Data Race 2
|
Data Race 3
|
Data Race 4
|
Very nice finds! Bugs and data races are always P0. |
This can be fixed in Flock by updating the schema for |
why are you running flock with a version of Dgraph from a moth ago? At least that's what the checksum I can take a look at them but we should be running dgraph on the latest version on master. |
preTraverse is doing:
while updateFacetsMatrix is doing:
I am quoting the lines so that they are easier in different commits. The problem seems obvious but I am not sure how to address it. Currently, there's not any kind of synchronization happening inside the subgraphs. I mentioned this to Manish before and he said that was intentional as different subgraphs are meant to be processed by different goroutines. But the query codebase is pretty hairy so that's probably not the case everywhere (or it was at some point but not anymore due to more recent changes). |
@martinmr |
I looked into the data races in query package and couldn't see how would |
I was able to reproduce this. An easy way of reproducing this is to just start one alpha and one Zero and then run both Lines 48 to 51 in 58820c0
|
- Fixes the race conditions mentioned in #3685 by removing global variables from `worker/task.go`. - I have also moved preTraverse and related functions to outputnode.go. - There is also a small optimization in ProcessGraph as we don't call fillVars with ParentVars if there are no more children of the current SubGraph node.
@animesh2049 confirmed that these races don't occur anymore. Closing this issue. |
I ran flock after @pawanrawal's PR. I didn't find any data race. |
If you suspect this could be a bug, follow the template.
Have you tried reproducing the issue with latest release?
Yes
Steps to reproduce the issue (command/config used to run Dgraph).
Use this script to run flock. It's just pulling new master of dgraph and flock and running them along with flock client.
My docker-compose.yml file
Check comments for races.
The text was updated successfully, but these errors were encountered: