{"record":{"id":"2a8464c96ddb0d52","repo":"dgraph-io/dgraph","slug":"unknown-group-for-tablet-v","errorCode":null,"errorMessage":"Unknown group for tablet: %+v","messagePattern":"Unknown group for tablet: %\\+v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dgraph/cmd/zero/zero.go","lineNumber":389,"sourceCode":"\t\t\t}\n\t\t\tres = append(res, proposal)\n\t\t}\n\t\tif !dstMember.Leader {\n\t\t\t// Don't continue to tablets if request is not from the leader.\n\t\t\treturn res, nil\n\t\t}\n\t\tif dst.SnapshotTs > group.SnapshotTs {\n\t\t\tres = append(res, &pb.ZeroProposal{\n\t\t\t\tSnapshotTs: map[uint32]uint64{dstMember.GroupId: dst.SnapshotTs},\n\t\t\t})\n\t\t}\n\t}\n\n\tvar tablets []*pb.Tablet\n\tfor key, dstTablet := range dst.Tablets {\n\t\tgroup, has := s.state.Groups[dstTablet.GroupId]\n\t\tif !has {\n\t\t\treturn res, errors.Errorf(\"Unknown group for tablet: %+v\", dstTablet)\n\t\t}\n\t\tsrcTablet, has := group.Tablets[key]\n\t\tif !has {\n\t\t\t// Tablet moved to new group\n\t\t\tcontinue\n\t\t}\n\n\t\ts := float64(srcTablet.OnDiskBytes)\n\t\td := float64(dstTablet.OnDiskBytes)\n\t\tif dstTablet.Remove || (s == 0 && d > 0) || (s > 0 && math.Abs(d/s-1) > 0.1) {\n\t\t\tdstTablet.Force = false\n\t\t\ttablets = append(tablets, dstTablet)\n\t\t}\n\t}\n\n\tif len(tablets) > 0 {\n\t\tres = append(res, &pb.ZeroProposal{Tablets: tablets})\n\t}","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/dgraph/cmd/zero/zero.go#L371-L407","documentation":"createProposals validates each tablet in the incoming state by looking up its GroupId in Zero's current groups. If the tablet's group doesn't exist in Zero's state, the tablet update cannot be turned into a proposal and is rejected with this error.","triggerScenarios":"UpdateMembership receives a state whose Tablets reference a GroupId missing from s.state.Groups — e.g., an Alpha advertising tablets for a group that was removed or never registered.","commonSituations":"Alpha restarted with stale tablet metadata pointing at an old group; Zero state rolled back to a snapshot predating the group's creation; manual edits/crafted requests to the membership endpoint.","solutions":["Compare the tablet's GroupId against /state output on Zero and restart the Alpha so it re-syncs tablets to valid groups.","Remove stale Alpha data so it stops advertising tablets for a nonexistent group.","Restore Zero from the correct/newer raft snapshot so the group exists.","Check for mixed dgraph versions that serialize group ids inconsistently; align all nodes."],"exampleFix":"// before\nstate := alpha.BuildTabletReport()\nzero.Inform(ctx, state) // tablets reference deleted group\n// after\nif !zeroGroupExists(alpha.Tablet.GroupId) {\n    alpha.ReassignTabletsToValidGroups()\n}\nzero.Inform(ctx, alpha.BuildTabletReport())","handlingStrategy":"validation","validationCode":"for _, t := range tablets {\n    if !zeroGroupExists(t.GroupId) {\n        return fmt.Errorf(\"tablet %s references unknown group %d\", t.Predicate, t.GroupId)\n    }\n}","typeGuard":"func tabletsHaveKnownGroups(groups map[uint64]*pb.Group, tablets []*pb.Tablet) bool {\n    for _, t := range tablets {\n        if _, ok := groups[t.GroupId]; !ok { return false }\n    }\n    return true\n}","tryCatchPattern":"_, err := zero.UpdateMembership(ctx, state)\nif err != nil && strings.Contains(err.Error(), \"Unknown group for tablet\") {\n    alpha.RebuildTabletMetadata(ctx)\n}","preventionTips":["Restore Zero and Alpha snapshots from the same point in time.","Drop stale Alpha p directories when their group no longer exists.","Reconcile tablet group ids against /state after topology changes.","Keep cluster versions uniform to avoid group-id serialization drift."],"tags":["zero","tablet","membership","stale-state"],"backgroundTag":"unknown-group-id","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}