{"record":{"id":"ef2f9577184d7973","repo":"dgraph-io/dgraph","slug":"unable-to-move-reserved-predicate-s","errorCode":null,"errorMessage":"Unable to move reserved predicate %s","messagePattern":"Unable to move reserved predicate (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dgraph/cmd/zero/tablet.go","lineNumber":148,"sourceCode":"\t}\n\n\treturn &pb.Status{Code: 0, Msg: fmt.Sprintf(\"namespace: %d. \"+\n\t\t\"Predicate: [%s] moved from group [%d] to [%d]\", req.Namespace, req.Tablet, srcGroup,\n\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)","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/dgraph/cmd/zero/tablet.go#L130-L166","documentation":"movePredicate (used by both the automatic rebalancer and MoveTablet) refuses to move predicates that Dgraph reserves for internal use, detected via x.IsReservedPredicate. Reserved predicates (e.g. internal/system predicates like dgraph.type, dgraph.xid, ACL predicates) are managed by the system and moving them would corrupt internal state, so the move is rejected unconditionally.","triggerScenarios":"Explicitly requesting a move for a reserved predicate via /moveTablet (e.g. tablet=dgraph.type), or the rebalancer somehow selecting one (normally filtered out earlier).","commonSituations":"Operators trying to manually rebalance system predicates to shrink a hot group; scripts iterating over all predicates from /state including reserved ones; misunderstanding that internal predicates are movable like user predicates.","solutions":["Do not move reserved predicates — they must stay where Dgraph assigns them","Filter reserved predicates (dgraph.* and ACL/system predicates) out of any rebalancing script","Rebalance only user-defined predicates listed in the schema"],"exampleFix":"// before\ncurl 'localhost:6080/moveTablet?tablet=dgraph.type&dst_group=2'\n// after\nPREDICATES=$(curl -s localhost:6080/state | jq -r '.groups[].tablets | keys[]' | grep -v '^dgraph\\.')\nfor p in $PREDICATES; do curl \"localhost:6080/moveTablet?tablet=$p&dst_group=2\"; done","handlingStrategy":"validation","validationCode":"case \"$TABLET\" in\n  dgraph.*|\"\"*) echo \"$TABLET is a reserved predicate and cannot be moved\"; exit 1;;\nesac","typeGuard":"is_movable() {\n  case \"$1\" in dgraph.*) return 1;; *) return 0;; esac\n}","tryCatchPattern":"resp=$(curl -s \"localhost:6080/moveTablet?tablet=$TABLET&dst_group=$DST\")\n[[ \"$(echo \"$resp\" | jq -r .msg)\" == *\"reserved predicate\"* ]] && echo \"skipping reserved predicate $TABLET\"","preventionTips":["Exclude dgraph.* predicates from any rebalancing automation","Never iterate 'all tablets from /state' without filtering reserved ones","Rebalance via Zero's built-in rebalancer instead of manual moves where possible"],"tags":["dgraph","zero","tablet","reserved-predicate","invalid-operation"],"backgroundTag":"reserved-predicate-move-rejected","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}