MCPcopy
hub / github.com/dgraph-io/dgraph / UpdateExtSnapshotStreamingState

Method UpdateExtSnapshotStreamingState

worker/import.go:456–470  ·  view source on GitHub ↗
(ctx context.Context,
	req *api.UpdateExtSnapshotStreamingStateRequest)

Source from the content-addressed store, hash-verified

454}
455
456func (w *grpcWorker) UpdateExtSnapshotStreamingState(ctx context.Context,
457 req *api.UpdateExtSnapshotStreamingStateRequest) (*pb.Status, error) {
458 if req == nil {
459 return nil, errors.New("UpdateExtSnapshotStreamingStateRequest must not be nil")
460 }
461
462 if req.Start && req.Finish {
463 return nil, errors.New("UpdateExtSnapshotStreamingStateRequest cannot have both Start and Finish set to true")
464 }
465
466 glog.Infof("[import] Applying import mode proposal: %+v", req)
467 err := groups().Node.proposeAndWait(ctx, &pb.Proposal{ExtSnapshotState: req})
468
469 return &pb.Status{}, err
470}
471
472// StreamExtSnapshot handles the stream of key-value pairs sent from proxy alpha.
473// It receives a Forward flag from the stream to determine if the current node is the leader.

Callers

nothing calls this directly

Calls 3

groupsFunction · 0.85
InfofMethod · 0.80
proposeAndWaitMethod · 0.45

Tested by

no test coverage detected