{"record":{"id":"744431b3b2f243fb","repo":"dgraph-io/dgraph","slug":"this-server-doesn-t-serve-group-id-v","errorCode":null,"errorMessage":"This server doesn't serve group id: %v","messagePattern":"This server doesn't serve group id: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"worker/mutation.go","lineNumber":911,"sourceCode":"\n\tnode := groups().Node\n\terr := node.proposeAndWait(ctx, &pb.Proposal{Mutations: m})\n\t// When we are filling txn context, we don't need to update latest delta if the transaction has failed.\n\tfillTxnContext(txnCtx, m.StartTs, err != nil)\n\treturn err\n}\n\n// Mutate is used to apply mutations over the network on other instances.\nfunc (w *grpcWorker) Mutate(ctx context.Context, m *pb.Mutations) (*api.TxnContext, error) {\n\tctx, span := otel.Tracer(\"\").Start(ctx, \"worker.Mutate\")\n\tdefer span.End()\n\n\ttxnCtx := &api.TxnContext{}\n\tif ctx.Err() != nil {\n\t\treturn txnCtx, ctx.Err()\n\t}\n\tif !groups().ServesGroup(m.GroupId) {\n\t\treturn txnCtx, errors.Errorf(\"This server doesn't serve group id: %v\", m.GroupId)\n\t}\n\n\treturn txnCtx, w.proposeAndWait(ctx, txnCtx, m)\n}\n\nfunc tryAbortTransactions(startTimestamps []uint64) {\n\t// Aborts if not already committed.\n\treq := &pb.TxnTimestamps{Ts: startTimestamps}\n\n\terr := groups().Node.blockingAbort(req)\n\tglog.Infof(\"tryAbortTransactions for %d txns. Error: %+v\\n\", len(req.Ts), err)\n}\n","sourceCodeStart":893,"sourceCodeEnd":924,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/worker/mutation.go#L893-L924","documentation":"Dgraph clusters shard data into groups, each owning a subset of predicates. Mutate checks groups().ServesGroup(m.GroupId) and returns this error when the receiving Alpha server is not part of the group that owns the mutation's target data. The request was routed to an Alpha that cannot propose the mutation for that group.","triggerScenarios":"Sending a Mutate RPC directly to an Alpha whose group membership does not include m.GroupId; stale membership after a server was removed/reassigned; m.GroupId filled in incorrectly by client code or an older Zero view; hitting an Alpha before it finished syncing membership.","commonSituations":"Direct gRPC calls to a specific Alpha IP in a multi-group cluster instead of routing through a zero-proxy/aware client; restarting or scaling down Alphas so group membership shifts while clients keep pinned connections; testing against a single-server setup with a GroupId from an old cluster snapshot.","solutions":["Route mutations through a Dgraph Alpha that serves the group — use the standard Dgraph client with connection to Zero/ Alpha addressing (or any Alpha in the right group) rather than a hard-coded node","Refresh cluster membership: verify with `/state` endpoint (or Zero's /state) which Alpha serves the GroupId, and point the client there","Restart/rejoin the Alpha so it registers with Zero and picks up the correct group assignment; ensure the tablet for the mutated predicates moved correctly"],"exampleFix":"// before\nconn, _ := grpc.Dial(\"alpha-2:9080\", ...) // alpha-2 does not serve group 1\n// after\nuse any Alpha known (via /state) to serve the target group, e.g.:\nconn, _ := grpc.Dial(\"alpha-1:9080\", ...)","handlingStrategy":"fallback","validationCode":"resp, _ := http.Get(alphaAddr + \"/state\")\n// parse resp: confirm an Alpha in the target group before sending Mutate","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"doesn't serve group id\") {\n    // refresh membership from /state and retry against an Alpha serving m.GroupId\n    return rerouteAndRetry(ctx, m)\n}","preventionTips":["Use a Dgraph-aware client/router instead of pinning gRPC connections to one Alpha","Check /state after topology changes (restarts, scale-down) before resuming traffic","Avoid hard-coding GroupId; let the client derive it from predicate tablet assignments"],"tags":["dgraph","cluster","routing","group-membership"],"backgroundTag":"server-does-not-serve-group","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}