gastownhall/beads · error
reading dolt_ignore: %w
Error message
reading dolt_ignore: %w
What it means
doltIgnoreSeeded reads the dolt_ignore system table to verify all canonical ignore patterns are seeded before taking the lock-free fast path. This error wraps a failure of the initial SELECT pattern FROM [qualifier.]dolt_ignore query — but only for errors that are NOT table-does-not-exist (that case cleanly returns false). It signals an unexpected read failure against a table that Dolt should materialize on every real database.
Source
Thrown at internal/storage/schema/converged.go:214
// cannot get the full be-bv7x probe-before-act treatment at table granularity.
// What it has instead: selectTargetDatabase has already proved this session is
// on the target database (by reading DATABASE(), or by probing
// information_schema.schemata and selecting it), Dolt materializes dolt_ignore
// on every real database (live-verified), the name is stated explicitly
// whenever one was quoted for us rather than re-derived here, and
// IsTableNotExist below fails closed onto the locked path should that
// materialization assumption break.
func doltIgnoreSeeded(ctx context.Context, db DBConn, qualifier string, mainVersionAtLeast int) (bool, error) {
table := "dolt_ignore"
if qualifier != "" {
table = qualifier + ".dolt_ignore"
}
rows, err := db.QueryContext(ctx, "SELECT pattern FROM "+table)
if err != nil {
if dberrors.IsTableNotExist(err) {
return false, nil
}
return false, fmt.Errorf("reading dolt_ignore: %w", err)
}
defer rows.Close()
present := make(map[string]struct{})
for rows.Next() {
var pattern string
if err := rows.Scan(&pattern); err != nil {
return false, fmt.Errorf("reading dolt_ignore: %w", err)
}
present[pattern] = struct{}{}
}
if err := rows.Err(); err != nil {
return false, fmt.Errorf("reading dolt_ignore: %w", err)
}
for _, pattern := range doltIgnorePatterns {
if _, ok := present[pattern]; !ok {
return false, nilView on GitHub (pinned to 71377f2769)
Solutions
- Retry — alreadyConverged fails closed, so bd will just take the normal locked migration path; the error may be transient
- Inspect the wrapped error for permission (denied) vs connection (EOF/refused) causes and fix accordingly
- Upgrade the Dolt server if dolt_ignore errors on your version
- Verify the database qualifier is correct if a custom DatabaseSelector is in play
Defensive patterns
Strategy: fallback
Validate before calling
// confirm the qualifier database name before the read
var n int
_ = db.QueryRow("SELECT COUNT(*) FROM information_schema.schemata WHERE schema_name = ?", dbname).Scan(&n)
if n == 0 { return } // wrong qualifier would error on dolt_ignore read Try / catch
if err != nil && strings.Contains(err.Error(), "reading dolt_ignore") {
// fall back to the locked migration path, which re-seeds dolt_ignore
return migrateUpLocked(ctx, db)
} Prevention
- Use stock DatabaseSelector so the qualifier is always correct
- Upgrade Dolt server to a version with stable dolt_ignore support
- Do not hand-edit dolt_ignore rows
When it happens
Trigger: SELECT pattern FROM dolt_ignore fails with a non-TableNotExist error: connection failure mid-open, permission denial on dolt_ignore, a misspelled database qualifier, a server version that errors on dolt_ignore, or context cancellation.
Common situations: Running against a Dolt server version where dolt_ignore behaves unexpectedly; grants restricting system-table reads; the pooled connection dying between the earlier probes and this query; typo'd or stale database qualifier from a custom selector.
Related errors
- dolt directory is required
- dolt binary not found
- dolt path is not executable
- dolt version probe failed
- dolt version output is unparseable
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/ea156dc1f363524d.
Report an issue: GitHub.