Add implementation for AllocateIDs and use the API in live loader#9400
Merged
mangalaman93 merged 1 commit intomainfrom May 12, 2025
Merged
Add implementation for AllocateIDs and use the API in live loader#9400mangalaman93 merged 1 commit intomainfrom
mangalaman93 merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
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)
ghost
reviewed
Apr 30, 2025
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.
ghost
approved these changes
May 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.