juicedata/juicefs · error

Fetch all metadata from DB: %s

Error message

Fetch all metadata from DB: %s

What it means

Returned by dbMeta.DumpMeta in fast mode when makeSnap fails to snapshot all metadata keys from the database into memory. It wraps the underlying query error — connection issues, timeouts, or lock contention during the snapshot pass.

Source

Thrown at pkg/meta/sql.go:4945

	}()

	progress := utils.NewProgress(false)
	defer progress.Done()
	var tree, trash *DumpedEntry
	root = m.checkRoot(root)
	return m.roTxn(Background(), func(s *xorm.Session) error {
		var lastChangelog int64
		if m.getFormat().ChangeLog {
			var maxLog changeLog
			if ok, _ := s.Desc("id").Limit(1).Get(&maxLog); ok {
				lastChangelog = maxLog.Id
			}
		}
		if root == RootInode && fast {
			defer func() { m.snap = nil }()
			bar := progress.AddCountBar("Snapshot keys", 0)
			if err = m.makeSnap(s, bar); err != nil {
				return fmt.Errorf("Fetch all metadata from DB: %s", err)
			}
			bar.Done()
			tree = m.dumpEntryFast(root, TypeDirectory)
			if !skipTrash {
				trash = m.dumpEntryFast(TrashInode, TypeDirectory)
			}
		} else {
			tree = &DumpedEntry{
				Name: "FSTree",
				Attr: &DumpedAttr{
					Inode: root,
					Type:  typeToString(TypeDirectory),
				},
			}
			if err = m.dumpEntry(s, root, TypeDirectory, tree, nil); err != nil {
				return err
			}
			if root == RootInode && !skipTrash {

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Retry the dump during a lower-traffic window
  2. Check DB connectivity and long-running transactions blocking the snapshot
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/meta/sql.go:4945 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/e574baa19d4617b8. Report an issue: GitHub.