Skip to content

Conversation

mangalaman93
Copy link
Member

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.

@Copilot Copilot AI review requested due to automatic review settings April 30, 2025 06:56
@mangalaman93 mangalaman93 requested a review from a team as a code owner April 30, 2025 06:56
@github-actions github-actions bot added area/testing Testing related issues area/graphql Issues related to GraphQL support on Dgraph. area/live-loader Issues related to live loading. area/acl Related to Access Control Lists area/core internal mechanisms go Pull requests that update Go code labels Apr 30, 2025
Copy link

@Copilot Copilot AI left a 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)

Copy link

trunk-io bot commented Apr 30, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@mangalaman93 mangalaman93 force-pushed the aman/zero branch 4 times, most recently from c42fad6 to 40188e6 Compare May 9, 2025 21:38
@mangalaman93 mangalaman93 enabled auto-merge (squash) May 9, 2025 21:38
@mangalaman93 mangalaman93 requested a review from harshil-goel May 10, 2025 09:01
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.
@mangalaman93 mangalaman93 merged commit 08fbcfc into main May 12, 2025
13 checks passed
@mangalaman93 mangalaman93 deleted the aman/zero branch May 12, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/acl Related to Access Control Lists area/core internal mechanisms area/graphql Issues related to GraphQL support on Dgraph. area/live-loader Issues related to live loading. area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

2 participants