dgraph-io/dgraph · error
while parsing predicate got: %q
Error message
while parsing predicate got: %q
What it means
upgradeManifest migrates a manifest written by an older Dgraph version (case 2103, i.e. v21.03) to the current schema. ACL predicate strings in m.Groups must be converted via x.AttrFrom2103; this error is thrown when a predicate stored in the 21.03 format cannot be parsed/converted.
Source
Thrown at worker/backup_manifest.go:189
m.Groups[gid] = parsedPreds
}
for _, op := range m.DropOperations {
switch op.DropOp {
case pb.DropOperation_DATA:
op.DropValue = fmt.Sprintf("%#x", x.RootNamespace)
case pb.DropOperation_ATTR:
op.DropValue = x.AttrInRootNamespace(op.DropValue)
default:
// do nothing for drop all and drop namespace.
}
}
case 2103:
for gid, preds := range m.Groups {
parsedPreds := preds[:0]
for _, pred := range preds {
ns_attr, err := x.AttrFrom2103(pred)
if err != nil {
return errors.Errorf("while parsing predicate got: %q", err)
}
parsedPreds = append(parsedPreds, ns_attr)
}
m.Groups[gid] = parsedPreds
}
for _, op := range m.DropOperations {
// We have a cluster wide drop data in v21.03.
if op.DropOp == pb.DropOperation_ATTR {
ns_attr, err := x.AttrFrom2103(op.DropValue)
if err != nil {
return errors.Errorf("while parsing the drop operation %+v got: %q",
op, err)
}
op.DropValue = ns_attr
}
}
case 2105:
// passView on GitHub (pinned to 759e242be6)
Solutions
- Inspect the manifest's Groups predicates and fix or remove malformed entries.
- Upgrade through intermediate Dgraph versions so manifests are converted stepwise.
- Take a fresh backup with the new version instead of reusing the old manifest.
- Restore ACL data and re-export a backup with the current version.
Example fix
// before: hand-edited predicate in manifest
"Groups": {"1": ["dgraph.x.unknown"]}
// after: use predicates created by the 21.03 format or regenerate via backup
dgraph backup --dst s3://bucket/new-backup Defensive patterns
Strategy: validation
Validate before calling
if m.Version == 2103 {
for gid, preds := range m.Groups {
for _, p := range preds {
if _, err := x.AttrFrom2103(p); err != nil {
return fmt.Errorf("group %s has unparsable predicate %q: %v", gid, p, err)
}
}
}
} Prevention
- Upgrade through intermediate supported versions stepwise
- Never hand-edit manifest files
- Regenerate backups with the target version before restoring
When it happens
Trigger: GetManifest loads a manifest whose version field is 2103 and a group's ACL predicate string cannot be converted by AttrFrom2103 — e.g. manifest written by an even older version, hand-edited predicate, or corrupt ACL data in the manifest.
Common situations: Upgrading a cluster across several versions (e.g. v20.x -> v23.x) skipping intermediate supported upgrade paths; manually edited manifests; ACL rules created under an incompatible format.
Related errors
- while parsing the drop operation %+v got: %q
- error querying old ACL rules: %w
- unable to parse ACLs: %v
- unable to unmarshal ACL: %v :: %w
- error upgrading ACL rules: %w
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/5965100c0a2d705b.
Report an issue: GitHub.