dgraph-io/dgraph · error

This server doesn't serve group id: %v

Error message

This server doesn't serve group id: %v

What it means

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.

Source

Thrown at worker/mutation.go:911

	node := groups().Node
	err := node.proposeAndWait(ctx, &pb.Proposal{Mutations: m})
	// When we are filling txn context, we don't need to update latest delta if the transaction has failed.
	fillTxnContext(txnCtx, m.StartTs, err != nil)
	return err
}

// Mutate is used to apply mutations over the network on other instances.
func (w *grpcWorker) Mutate(ctx context.Context, m *pb.Mutations) (*api.TxnContext, error) {
	ctx, span := otel.Tracer("").Start(ctx, "worker.Mutate")
	defer span.End()

	txnCtx := &api.TxnContext{}
	if ctx.Err() != nil {
		return txnCtx, ctx.Err()
	}
	if !groups().ServesGroup(m.GroupId) {
		return txnCtx, errors.Errorf("This server doesn't serve group id: %v", m.GroupId)
	}

	return txnCtx, w.proposeAndWait(ctx, txnCtx, m)
}

func tryAbortTransactions(startTimestamps []uint64) {
	// Aborts if not already committed.
	req := &pb.TxnTimestamps{Ts: startTimestamps}

	err := groups().Node.blockingAbort(req)
	glog.Infof("tryAbortTransactions for %d txns. Error: %+v\n", len(req.Ts), err)
}

View on GitHub (pinned to 759e242be6)

Solutions

  1. 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
  2. Refresh cluster membership: verify with `/state` endpoint (or Zero's /state) which Alpha serves the GroupId, and point the client there
  3. 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

Example fix

// before
conn, _ := grpc.Dial("alpha-2:9080", ...) // alpha-2 does not serve group 1
// after
use any Alpha known (via /state) to serve the target group, e.g.:
conn, _ := grpc.Dial("alpha-1:9080", ...)
Defensive patterns

Strategy: fallback

Validate before calling

resp, _ := http.Get(alphaAddr + "/state")
// parse resp: confirm an Alpha in the target group before sending Mutate

Try / catch

if strings.Contains(err.Error(), "doesn't serve group id") {
    // refresh membership from /state and retry against an Alpha serving m.GroupId
    return rerouteAndRetry(ctx, m)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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