dgraph-io/dgraph · error

while Getting latest manifest:

Error message

while Getting latest manifest: 

What it means

When no master manifest exists, getConsolidatedManifest reads each per-backup manifest file to build one. This error wraps a failure of readManifest for any individual backup directory, meaning one of the per-backup manifest files could not be read or the list of paths is stale.

Source

Thrown at worker/backup_manifest.go:148

	paths := h.ListPaths("")

	var manifestPaths []string
	suffix := filepath.Join(string(filepath.Separator), backupManifest)
	for _, p := range paths {
		if strings.HasSuffix(p, suffix) {
			manifestPaths = append(manifestPaths, p)
		}
	}

	sort.Strings(manifestPaths)
	var mlist []*Manifest

	for _, path := range manifestPaths {
		path = filepath.Dir(path)
		_, path = filepath.Split(path)
		m, err := readManifest(h, filepath.Join(path, backupManifest))
		if err != nil {
			return nil, errors.Wrap(err, "while Getting latest manifest: ")
		}
		m.Path = path
		mlist = append(mlist, m)
	}
	return &MasterManifest{Manifests: mlist}, nil
}

// upgradeManifest updates the in-memory manifest from various versions to the latest version.
// If the manifest version is 0 (dgraph version < v21.03), attach namespace to the predicates and
// the drop data/attr operation.
// If the manifest version is 2103, convert the format of predicate from <ns bytes>|<attr> to
// <ns string>-<attr>. This is because of a bug for namespace greater than 127.
// See https://github.com/dgraph-io/dgraph/pull/7810
// NOTE: Do not use the upgraded manifest to overwrite the non-upgraded manifest.
func upgradeManifest(m *Manifest) error {
	switch m.Version {
	case 0:
		for gid, preds := range m.Groups {

View on GitHub (pinned to 759e242be6)

Solutions

  1. Re-list the backup location and retry once stale entries are gone.
  2. Fix read permissions on the affected backup directory.
  3. Restore the missing/corrupt per-backup manifest file.
  4. Prevent lifecycle rules from deleting manifests while consolidation runs.

Example fix

// before: s3 lifecycle expires manifest during listing
{"Rules":[{"Prefix":"backup/","Expiration":{"Days":1}}]}
// after: keep manifests until backup retention window passes
{"Rules":[{"Prefix":"backup/","Expiration":{"Days":30}}]}
Defensive patterns

Strategy: retry

Validate before calling

paths := h.ListPaths("")
for _, p := range paths {
    if !h.FileExists(filepath.Join(filepath.Base(filepath.Dir(p)), backupManifest)) {
        return fmt.Errorf("manifest listed but missing: %s", p)
    }
}

Try / catch

m, err := GetManifestNoUpgrade(h, uri)
if err != nil && strings.Contains(err.Error(), "while Getting latest manifest") {
    time.Sleep(2 * time.Second)
    m, err = GetManifestNoUpgrade(h, uri) // stale listing entries usually clear
}

Prevention

When it happens

Trigger: GetManifestNoUpgrade triggers consolidation; during iteration over manifestPaths, readManifest(h, path/manifest.yaml) fails for some backup directory — deleted file between listing and read, permission error, or corrupt file.

Common situations: Concurrent deletion/lifecycle expiration of a backup directory; object listing cache returning paths that no longer exist; per-directory permission differences.

Related errors


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