dgraph-io/dgraph · warning

Group ID is Zero in %+v

Error message

Group ID is Zero in %+v

What it means

Error returned by the Zero server (dgraph/cmd/zero/zero.go) when a server instance that is configured as Zero (with group ID 0 / acting as Zero) appears in a context where it is unexpected, e.g. during membership or grouping checks. The server state is printed via %+v. Fix by ensuring server configuration/assignments are consistent with the cluster membership.

Source

Thrown at dgraph/cmd/zero/zero.go:419

			tablets = append(tablets, dstTablet)
		}
	}

	if len(tablets) > 0 {
		res = append(res, &pb.ZeroProposal{Tablets: tablets})
	}
	return res, nil
}

func (s *Server) Inform(ctx context.Context, req *pb.TabletRequest) (*pb.TabletResponse, error) {
	ctx, span := otel.Tracer("").Start(ctx, "Zero.Inform")
	defer span.End()
	if req == nil || len(req.Tablets) == 0 {
		return nil, errors.Errorf("Tablets are empty in %+v", req)
	}

	if req.GroupId == 0 {
		return nil, errors.Errorf("Group ID is Zero in %+v", req)
	}

	tablets := make([]*pb.Tablet, 0)
	unknownTablets := make([]*pb.Tablet, 0)
	for _, t := range req.Tablets {
		tab := s.ServingTablet(t.Predicate)
		span.SetAttributes(attribute.String("tablet_predicate", t.Predicate))
		switch {
		case tab != nil && !t.Force:
			tablets = append(tablets, t)
		case t.ReadOnly:
			tablets = append(tablets, &pb.Tablet{})
		default:
			unknownTablets = append(unknownTablets, t)
		}
	}

	if len(unknownTablets) == 0 {

View on GitHub (pinned to 759e242be6)

Solutions

  1. Set req.GroupId to the Alpha's assigned group before calling Inform (obtain it from Zero's /state or the membership response).
  2. Ensure the Alpha completed group assignment/leader election before reporting tablets.
  3. In custom clients, validate GroupId > 0 prior to the gRPC call.
  4. Check Alpha logs to confirm it joined a group (member.GroupId nonzero) at startup.

Example fix

// before
req := &pb.TabletRequest{Tablets: tablets}
// after
if member.GroupId == 0 {
    return errors.New("alpha not yet assigned to a group")
}
req := &pb.TabletRequest{Tablets: tablets, GroupId: member.GroupId}
Defensive patterns

Strategy: validation

Validate before calling

if req.GroupId == 0 {
    return errors.New("GroupId must be set to the alpha's assigned group")
}

Type guard

func hasValidGroupId(req *pb.TabletRequest) bool {
    return req != nil && req.GroupId > 0
}

Try / catch

resp, err := zeroClient.Inform(ctx, req)
if err != nil && strings.Contains(err.Error(), "Group ID is Zero") {
    req.GroupId = fetchAssignedGroupFromState()
    resp, err = zeroClient.Inform(ctx, req)
}

Prevention

When it happens

Trigger: Calling Zero's Inform gRPC with a TabletRequest whose GroupId field is left unset (0) — e.g., struct built without filling GroupId, or an Alpha that hasn't yet been assigned to a group.

Common situations: Hand-written clients using zero.pb omitting GroupId; an Alpha started without membership assignment (never joined a group) reporting tablets; tests constructing TabletRequest literals missing the field.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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