juicedata/juicefs · error

unsupported driver

Error message

unsupported driver %s

What it means

newTkvClient looked up the driver name in the package-level drivers registry and found no matching constructor. This is a configuration validation error: the engine string (e.g., tikv, etcd, badger, fdb) is misspelled, unregistered, or the build was compiled without that backend's tags.

Solutions

  1. Check the driver name spelling in the metadata URL
  2. Use a build that includes the engine (e.g. make juicefs.fdb for FoundationDB)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/meta/tkv.go:110 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/e9cfb18b24bca7e7. Report an issue: GitHub.

Appendix: source

Thrown at pkg/meta/tkv.go:110

		return true
	})
}

type kvMeta struct {
	*baseMeta
	client tkvClient
	snap   map[Ino]*DumpedEntry
}

var _ Meta = (*kvMeta)(nil)
var _ engine = (*kvMeta)(nil)

var drivers = make(map[string]func(string) (tkvClient, error))

func newTkvClient(driver, addr string) (tkvClient, error) {
	fn, ok := drivers[driver]
	if !ok {
		return nil, fmt.Errorf("unsupported driver %s", driver)
	}
	return fn(addr)
}

func newKVMeta(driver, addr string, conf *Config) (Meta, error) {
	client, err := newTkvClient(driver, addr)
	if err != nil {
		return nil, fmt.Errorf("connect to addr %s: %s", addr, err)
	}
	// TODO: ping server and check latency > Millisecond
	// logger.Warnf("The latency to database is too high: %s", time.Since(start))
	m := &kvMeta{
		baseMeta: newBaseMeta(addr, conf),
		client:   client,
	}
	m.en = m
	return m, nil
}

View on GitHub (pinned to c9a67b23e8)