dgraph-io/dgraph · warning
Tablets are empty in %+v
Error message
Tablets are empty in %+v
What it means
Zero.Inform is the gRPC endpoint Alphas call to report which tablets they serve. If the request is nil or carries no tablets, Zero rejects it because there is nothing to record — a report must contain at least one tablet.
Source
Thrown at dgraph/cmd/zero/zero.go:415
s := float64(srcTablet.OnDiskBytes)
d := float64(dstTablet.OnDiskBytes)
if dstTablet.Remove || (s == 0 && d > 0) || (s > 0 && math.Abs(d/s-1) > 0.1) {
dstTablet.Force = false
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)View on GitHub (pinned to 759e242be6)
Solutions
- Ensure the Alpha has data/predicates to report; an empty Alpha should not call Inform until it serves a tablet.
- If calling the gRPC API directly, populate req.Tablets with at least one pb.Tablet and set GroupId.
- Wait for the normal Alpha mutation/leader flow to populate tablets before expecting Inform to succeed.
- Check Alpha logs for a bug that empties the tablet list before reporting.
Example fix
// before
zeroClient.Inform(ctx, &pb.TabletRequest{GroupId: 1})
// after
if len(tablets) == 0 {
return nil // nothing to report
}
zeroClient.Inform(ctx, &pb.TabletRequest{GroupId: 1, Tablets: tablets}) Defensive patterns
Strategy: validation
Validate before calling
if req == nil || len(req.Tablets) == 0 {
return errors.New("nothing to report: tablets list is empty")
} Type guard
func isReportable(req *pb.TabletRequest) bool {
return req != nil && len(req.Tablets) > 0
} Try / catch
resp, err := zeroClient.Inform(ctx, req)
if err != nil && strings.Contains(err.Error(), "Tablets are empty") {
log.Debug("skipping empty tablet report")
return nil
} Prevention
- Skip Inform calls when the Alpha serves no tablets.
- Build TabletRequest from the actual serving-tablet set, never literals.
- Assert req.Tablets non-empty in tests exercising Inform.
- Check Alpha tablet collection logic if empty reports recur.
When it happens
Trigger: An Alpha calls Inform with an empty Tablets slice or a nil TabletRequest, e.g., during startup before any predicate is assigned, or a client calling the gRPC API directly with an empty request.
Common situations: Empty Alpha starting with no data directory sending an empty tablet report; custom scripts invoking Inform with a hand-built TabletRequest missing Tablets; a bug in Alpha-side tablet collection.
Related errors
- Group ID is Zero in %+v
- Tablet predicate is empty in %+v
- connection string cannot be empty
- Unhealthy connection to %v
- group: [%d] is not a known group
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/2421451db2834ad0.
Report an issue: GitHub.