(ctx context.Context, req *pb.DeleteNsRequest)
| 19 | ) |
| 20 | |
| 21 | func (w *grpcWorker) DeleteNamespace(ctx context.Context, req *pb.DeleteNsRequest) (*pb.Status, error) { |
| 22 | var emptyRes pb.Status |
| 23 | if !groups().ServesGroup(req.GroupId) { |
| 24 | return &emptyRes, errors.Errorf("The server doesn't serve group id: %v", req.GroupId) |
| 25 | } |
| 26 | |
| 27 | if err := groups().Node.proposeAndWait(ctx, &pb.Proposal{DeleteNs: req}); err != nil { |
| 28 | return &emptyRes, errors.Wrapf(err, "Delete namespace failed for namespace %d on group %d", |
| 29 | req.Namespace, req.GroupId) |
| 30 | } |
| 31 | return &emptyRes, nil |
| 32 | } |
| 33 | |
| 34 | func ProcessDeleteNsRequest(ctx context.Context, ns uint64) error { |
| 35 | // Update the membership state to get the latest mapping of groups to predicates. |
nothing calls this directly
no test coverage detected