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

Method deleteNamespace

dgraph/cmd/zero/raft.go:356–371  ·  view source on GitHub ↗
(delNs uint64)

Source from the content-addressed store, hash-verified

354}
355
356func (n *node) deleteNamespace(delNs uint64) error {
357 n.server.AssertLock()
358 state := n.server.state
359 glog.Infof("Deleting namespace %d", delNs)
360 defer n.regenerateChecksum()
361
362 for _, group := range state.Groups {
363 for pred := range group.Tablets {
364 ns := x.ParseNamespace(pred)
365 if ns == delNs {
366 delete(group.Tablets, pred)
367 }
368 }
369 }
370 return nil
371}
372
373func (n *node) applySnapshot(snap *pb.ZeroSnapshot) error {
374 existing, err := n.Store.Snapshot()

Callers 1

applyProposalMethod · 0.95

Calls 4

regenerateChecksumMethod · 0.95
ParseNamespaceFunction · 0.92
AssertLockMethod · 0.80
InfofMethod · 0.80

Tested by

no test coverage detected