{"record":{"id":"de3b649899e8a807","repo":"dgraph-io/dgraph","slug":"tablet-to-be-moved-v-is-not-being-served","errorCode":null,"errorMessage":"Tablet to be moved: [%v] is not being served","messagePattern":"Tablet to be moved: \\[(.+?)\\] is not being served","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dgraph/cmd/zero/tablet.go","lineNumber":152,"sourceCode":"\t\treq.DstGroup)}, nil\n}\n\n// movePredicate is the main entry point for move predicate logic. This Zero must remain the leader\n// for the entire duration of predicate move. If this Zero stops being the leader, the final\n// proposal of reassigning the tablet to the destination would fail automatically.\nfunc (s *Server) movePredicate(predicate string, srcGroup, dstGroup uint32) (err error) {\n\ts.moveOngoing <- struct{}{}\n\tdefer func() {\n\t\t<-s.moveOngoing\n\t}()\n\n\t// Ensure that reserved predicates cannot be moved.\n\tif x.IsReservedPredicate(predicate) {\n\t\treturn errors.Errorf(\"Unable to move reserved predicate %s\", predicate)\n\t}\n\ttab := s.ServingTablet(predicate)\n\tif tab == nil {\n\t\treturn errors.Errorf(\"Tablet to be moved: [%v] is not being served\", predicate)\n\t}\n\n\t// Feed the outcome of this attempt back to the rebalancer, so it stops re-picking a tablet\n\t// whose moves keep failing.\n\tstart := time.Now()\n\tdefer func() {\n\t\ts.recordMoveResult(predicate, time.Since(start), err)\n\t}()\n\n\ttimeout := moveTimeout(predicateMoveTimeout, tab)\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\tspan := trace.SpanFromContext(ctx)\n\tdefer span.End()\n\n\t// Ensure that I'm connected to the rest of the Zero group, and am the leader.\n\tif _, err := s.latestMembershipState(ctx); err != nil {","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/dgraph/cmd/zero/tablet.go#L134-L170","documentation":"movePredicate re-checks Zero's membership map with s.ServingTablet(predicate) before starting the move. If no tablet entry exists for the predicate at move time, there is no source group and no data to stream, so it aborts with this error. Unlike error 121 this fires inside movePredicate, so it can also trigger from the automatic rebalancer when membership changes between choosing and moving a tablet.","triggerScenarios":"The predicate was dropped between tablet selection and the move; membership state changed so the predicate is no longer assigned; MoveTablet called with a predicate not in the serving map (e.g. race with DropAll/DropAttr); rebalancer picked a stale tablet entry.","commonSituations":"Running manual moves concurrently with schema drops or data deletions; rebalancer racing with cluster membership churn; moving a predicate on a group whose Alphas just lost leadership and re-registered without the tablet.","solutions":["Re-check /state to confirm the predicate is currently being served and by which group","If the predicate was intentionally dropped, do nothing — the error is expected","Retry the move after membership stabilizes if the predicate should exist","Avoid running moves concurrently with drop operations"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"tablet_is_served() {\n  curl -s localhost:6080/state | jq -e --arg p \"$1\" \\\n    '[.groups[].tablets // {} | keys[]] | index($p) != null' >/dev/null\n}\ntablet_is_served \"$TABLET\" || exit 0","typeGuard":null,"tryCatchPattern":"for i in 1 2 3; do\n  resp=$(curl -s \"localhost:6080/moveTablet?tablet=$TABLET&dst_group=$DST\")\n  msg=$(echo \"$resp\" | jq -r .msg)\n  [[ \"$msg\" == *\"is not being served\"* ]] && { sleep 10; continue; }\n  break\ndone","preventionTips":["Don't run manual moves concurrently with DropAll/DropAttr operations","Re-read /state immediately before each move instead of caching membership","If the predicate was intentionally dropped, treat this error as expected"],"tags":["dgraph","zero","tablet","membership","race-condition"],"backgroundTag":"tablet-not-being-served","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}