Skip to content

make dgraph import work across the internet #9456

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mangalaman93
Copy link
Member

@mangalaman93 mangalaman93 commented Jun 25, 2025

This PR fixes the timeout issue when cloudflare is not happy for just one way data send. It adds application level ACKs to work around the 120s timeout for a HTTP response.

Additionally, it adds an argument to take p directory as input for the dgraph import command.

@github-actions github-actions bot added go Pull requests that update Go code area/testing Testing related issues area/core internal mechanisms labels Jun 25, 2025
@mangalaman93 mangalaman93 marked this pull request as ready for review July 10, 2025 11:31
@Copilot Copilot AI review requested due to automatic review settings July 10, 2025 11:31
@mangalaman93 mangalaman93 requested a review from a team as a code owner July 10, 2025 11:31
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 adds support for streaming p directories in import command by implementing bidirectional streaming for external snapshot operations. The core purpose is to enhance the import functionality to handle streaming of snapshot data to and from p directories more efficiently.

Key changes:

  • Converts external snapshot streaming from unidirectional to bidirectional streaming with proper acknowledgment flow
  • Adds support for direct p directory streaming in import command with new -p flag
  • Improves error handling and logging throughout the streaming process

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
worker/import.go Implements bidirectional streaming with Send/Recv pattern and enhanced error handling
protos/pb.proto Updates StreamExtSnapshot service to support bidirectional streaming
protos/pb/pb_grpc.pb.go Generated code changes for bidirectional streaming interface
dgraph/cmd/dgraphimport/run.go Adds support for -p flag to directly import from snapshot directories
dgraph/cmd/dgraphimport/import_client.go Implements client-side bidirectional streaming with acknowledgments
edgraph/server.go Updates server-side streaming handlers with better error handling
Other files Build system improvements and test updates
Comments suppressed due to low confidence (1)

worker/import.go:246

  • [nitpick] The error message has inconsistent verb formatting. Change to "failed streamInGroupto send forward request: %w" to match the wrapping pattern used elsewhere or keep it consistent with line 246.
		return fmt.Errorf("failed to send forward request: %v", err)

@mangalaman93 mangalaman93 changed the title Add support for streaming p directories in import command make dgraph import work across the internet Jul 10, 2025
This PR fixes the timeout issue when cloudflare is not happy
for just one way data send. It adds application level ACKs
to work around the 120s timeout for a HTTP response.

Additionally, it adds an argument to take p directory as
input for the dgraph import command.
@github-actions github-actions bot added the area/integrations Related to integrations with other projects. label Jul 10, 2025
Copy link

trunk-io bot commented Jul 10, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copy link

trunk-io bot commented Jul 10, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core internal mechanisms area/integrations Related to integrations with other projects. area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

1 participant