{"record":{"id":"25ed62bc97d7ce83","repo":"gastownhall/beads","slug":"conflict-columns-for-table-s-w","errorCode":null,"errorMessage":"conflict columns for table %s: %w","messagePattern":"conflict columns for table (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/versioncontrolops/automerge.go","lineNumber":106,"sourceCode":"\t// same courtesy the config path pays for an otherwise-undiagnosable\n\t// supersession.\n\tlww []string\n}\n\n// loadConflictRows reads every live conflict row of table in raw scanned form.\nfunc loadConflictRows(ctx context.Context, db DBConn, table string) ([]rawConflictRow, error) {\n\tif err := ValidateConflictTable(table); err != nil {\n\t\treturn nil, err\n\t}\n\trows, err := db.QueryContext(ctx, \"SELECT * FROM `dolt_conflicts_\"+table+\"`\") //nolint:gosec // table validated as an identifier above\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"query conflicts for table %s: %w\", table, err)\n\t}\n\tdefer func() { _ = rows.Close() }()\n\n\tcols, err := rows.Columns()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"conflict columns for table %s: %w\", table, err)\n\t}\n\tvar out []rawConflictRow\n\tfor rows.Next() {\n\t\tvals := make([]any, len(cols))\n\t\tptrs := make([]any, len(cols))\n\t\tfor i := range vals {\n\t\t\tptrs[i] = &vals[i]\n\t\t}\n\t\tif err := rows.Scan(ptrs...); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"scan conflict row for table %s: %w\", table, err)\n\t\t}\n\t\tout = append(out, rawConflictRow{cols: cols, vals: vals})\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"iterate conflicts for table %s: %w\", table, err)\n\t}\n\treturn out, nil\n}","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/versioncontrolops/automerge.go#L88-L124","documentation":"After querying a dolt_conflicts_<table> system table, loadConflictRows calls rows.Columns() to learn the row shape; this error wraps that failure. It indicates the result set metadata could not be read even though the query succeeded, which is rare and usually signals a broken connection or driver-level problem.","triggerScenarios":"Auto-merge resolution reads conflict rows and the driver fails to return column metadata for the conflicts result set — connection reset between QueryContext and Columns, or a driver/protocol error.","commonSituations":"Unstable network to a remote Dolt server; server killed mid-query; database driver version mismatch with the server protocol.","solutions":["Check and restore the Dolt connection, then retry the auto-resolve","Update the mysql/dolt driver and server to compatible versions","Retry the merge resolution; the conflict set is re-readable after reconnect"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if err := db.PingContext(ctx); err != nil {\n    return fmt.Errorf(\"connection unhealthy before conflict resolution: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"err := versioncontrolops.TryAutoResolveMergeConflicts(ctx, db)\nif err != nil && strings.Contains(err.Error(), \"conflict columns for table\") {\n    // metadata read failed mid-stream: reconnect and retry once\n    return retryAfterReconnect(ctx, db)\n}","preventionTips":["Use a stable connection to the Dolt server during merge resolution","Keep mysql-go driver and Dolt server protocol versions matched","Avoid killing long-running resolution processes","Set connection keepalives on remote Dolt deployments"],"tags":["dolt","merge-conflicts","driver"],"backgroundTag":"dolt-conflict-table-read-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}