-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add implementation for AllocateIDs and use the API in live loader #9400
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.
Pull Request Overview
This PR introduces the new AllocateIDs API for UID, namespace, and timestamp allocation, replacing the deprecated testutil.AssignUids helper and related network calls. Key changes include updating various systest and query tests to invoke dg.AllocateUIDs, refactoring API calls from worker.AssignUidsOverNetwork to worker.AssignIDsOverNetwork, and removing legacy zero dependency code from live loader tests and related files.
Reviewed Changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
systest/bgindex/string_test.go | Updated test to use AllocateUIDs in place of AssignUids |
systest/bgindex/reverse_test.go | Updated test to use AllocateUIDs instead of AssignUids |
systest/bgindex/parallel_test.go | Replaced AssignUids with AllocateUIDs but noted a typo in the error msg |
systest/bgindex/count_test.go | Updated test to call AllocateUIDs; error message is updated |
query/mutation.go and graphql/admin/assign.go | Updated API calls to use AssignIDsOverNetwork |
edgraph/zero.go | New implementation for AllocateIDs |
dgraphtest and dgraphapi files | Removed legacy AssignUids functions and interface members |
dgraph/cmd/live/... files | Deprecated zero flag and removed zero connection usage in live loader |
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (1)
systest/bgindex/parallel_test.go:65
- Correct the typo in the error message: change 'assignig' to 'assigning' for consistency.
t.Fatalf("error in assignig UIDs :: %v", err)
c42fad6
to
40188e6
Compare
This PR implements the AllocateIDs API for allocating UIDs, namespaces and timestamps for bulk and live loader. For now, this PR also updates the live loader to use this API and completely avoid talkingt to zero directly.
This PR implements the AllocateIDs API for allocating UIDs, namespaces and timestamps for bulk and live loader. For now, this PR also updates the live loader to use this API and completely avoid talking to zero directly.