dgraph-io/dgraph · error

namespace: %d. No tablet found for: %s

Error message

namespace: %d. No tablet found for: %s

What it means

MoveTablet looks up the tablet for the requested predicate (namespaced via x.NamespaceAttr) in Zero's membership state via s.ServingTablet. If no group is currently serving that predicate, there is nothing to move, so Zero returns an invalid-request Status with this message. This is a lookup failure against the live membership map, not a request-format error.

Source

Thrown at dgraph/cmd/zero/tablet.go:116

	knownGroups := s.KnownGroups()
	var isKnown bool
	for _, grp := range knownGroups {
		if grp == req.DstGroup {
			isKnown = true
			break
		}
	}
	if !isKnown {
		return &pb.Status{Code: 1, Msg: x.ErrorInvalidRequest},
			fmt.Errorf("group: [%d] is not a known group", req.DstGroup)
	}

	tablet := x.NamespaceAttr(req.Namespace, req.Tablet)
	tab := s.ServingTablet(tablet)
	if tab == nil {
		return &pb.Status{Code: 1, Msg: x.ErrorInvalidRequest},
			fmt.Errorf("namespace: %d. No tablet found for: %s", req.Namespace, req.Tablet)
	}

	srcGroup := tab.GroupId
	if srcGroup == req.DstGroup {
		return &pb.Status{Code: 1, Msg: x.ErrorInvalidRequest},
			fmt.Errorf("namespace: %d. Tablet: [%s] is already being served by group: [%d]",
				req.Namespace, req.Tablet, srcGroup)
	}

	if err := s.movePredicate(tablet, srcGroup, req.DstGroup); err != nil {
		glog.Errorf("namespace: %d. While moving predicate %s from %d -> %d. Error: %v",
			req.Namespace, req.Tablet, srcGroup, req.DstGroup, err)
		return &pb.Status{Code: 1, Msg: x.Error}, err
	}

	return &pb.Status{Code: 0, Msg: fmt.Sprintf("namespace: %d. "+
		"Predicate: [%s] moved from group [%d] to [%d]", req.Namespace, req.Tablet, srcGroup,
		req.DstGroup)}, nil

View on GitHub (pinned to 759e242be6)

Solutions

  1. List current tablets via /state on Zero and use the exact serving predicate name
  2. Verify the predicate still exists (query the schema; it may have been dropped)
  3. Check the namespace parameter matches the namespace the predicate actually lives in
  4. Wait for/re-verify membership if the tablet was just created and membership hasn't propagated

Example fix

// before
curl 'localhost:6080/moveTablet?tablet=Person.name&namespace=0'  // never written, not serving
// after
curl 'localhost:6080/state' | jq '.. | .tablet? // empty'        // confirm exact tablet name
curl 'localhost:6080/moveTablet?tablet=Person.name&namespace=0'
Defensive patterns

Strategy: validation

Validate before calling

state=$(curl -s localhost:6080/state)
echo "$state" | jq -e --arg p "$TABLET" \
  '[.groups[].tablets // {} | keys[]] | index($p) != null' \
  || { echo "tablet $TABLET is not being served"; exit 1; }

Type guard

tablet_is_served() {
  curl -s localhost:6080/state | jq -e --arg p "$1" \
    '[.groups[].tablets // {} | keys[]] | index($p) != null' >/dev/null
}

Try / catch

resp=$(curl -s "localhost:6080/moveTablet?tablet=$TABLET&namespace=$NS&dst_group=$DST")
[ "$(echo "$resp" | jq -r .code)" = 1 ] && echo "rejected: $(echo "$resp" | jq -r .msg)"

Prevention

When it happens

Trigger: Calling /moveTablet with a tablet (predicate) name that no Alpha group is serving: misspelled predicate name, predicate never created/written, or the tablet was recently dropped so membership no longer lists it.

Common situations: Typo in predicate name in a rebalance script; moving a predicate after it was dropped via DropAll/DropData; namespace mismatch — the predicate exists in namespace 0 but the request specified another namespace; freshly bootstrapped cluster where the predicate hasn't been assigned yet.

Related errors


AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01). Data as JSON: /api/errors/4c05d1271ff21403. Report an issue: GitHub.