-
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
Correctness Fix: Block before proposing mutations and improve conflict key generation #3565
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.
The tests are failing, I've triggered another run of the tests to rule out transient failures.
Other than that, the PR LGTM.
Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @gitlw and @martinmr)
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.
Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @gitlw and @martinmr)
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.
Reviewed 4 of 4 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain)
worker/groups.go, line 203 at r2 (raw file):
// Propose schema mutation. var m pb.Mutations // schema for a reserved predicate is not changed once set.
minor: maybe move or remove this comment. It seems out of context now.
This PR fixes two things:
This PR fixes that by ensuring that Dgraph waits for the Alpha involved to have reached StartTs. Only then would it propose a new update. This ensures that all the updates are in correct order.
Conflict Keys: Previously, Dgraph was generating conflict keys based on (S, P) for all list values, and (S, P, O) for all uids. This PR changes that by using (S, P) for singular predicates, without considering whether they are uid or value; and using (S, P, O) for list uids/values. This PR also adds conflict keys for indices, treating them as list of uids.
Based on tests by @danielmai , this PR does not have any impact on the live loader throughput.
This change is