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

Function RemoveNodeOverNetwork

worker/zero.go:17–25  ·  view source on GitHub ↗

RemoveNodeOverNetwork sends a request to remove the given node from given group to a zero server. This operation doesn't necessarily require a zero leader.

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

Source from the content-addressed store, hash-verified

15// RemoveNodeOverNetwork sends a request to remove the given node from given group to a zero server.
16// This operation doesn't necessarily require a zero leader.
17func RemoveNodeOverNetwork(ctx context.Context, req *pb.RemoveNodeRequest) (*pb.Status, error) {
18 pl := groups().AnyServer(0)
19 if pl == nil {
20 return nil, conn.ErrNoConnection
21 }
22
23 c := pb.NewZeroClient(pl.Get())
24 return c.RemoveNode(ctx, req)
25}
26
27// MoveTabletOverNetwork sends a request to move the given tablet to destination group to the
28// current zero leader.

Callers 1

resolveRemoveNodeFunction · 0.92

Calls 5

RemoveNodeMethod · 0.95
NewZeroClientFunction · 0.92
groupsFunction · 0.85
AnyServerMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected