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

Function MoveTabletOverNetwork

worker/zero.go:29–37  ·  view source on GitHub ↗

MoveTabletOverNetwork sends a request to move the given tablet to destination group to the current zero leader.

(ctx context.Context, req *pb.MoveTabletRequest)

Source from the content-addressed store, hash-verified

27// MoveTabletOverNetwork sends a request to move the given tablet to destination group to the
28// current zero leader.
29func MoveTabletOverNetwork(ctx context.Context, req *pb.MoveTabletRequest) (*pb.Status, error) {
30 pl := groups().Leader(0)
31 if pl == nil {
32 return nil, conn.ErrNoConnection
33 }
34
35 c := pb.NewZeroClient(pl.Get())
36 return c.MoveTablet(ctx, req)
37}

Callers 1

resolveMoveTabletFunction · 0.92

Calls 5

MoveTabletMethod · 0.95
NewZeroClientFunction · 0.92
groupsFunction · 0.85
GetMethod · 0.65
LeaderMethod · 0.45

Tested by

no test coverage detected