gastownhall/beads · error

per-row conflict resolution is not supported for table %s; r

Error message

per-row conflict resolution is not supported for table %s; resolve the whole table instead

What it means

ResolveConflictRows refuses to resolve conflicts row-by-row for a table that is not listed in conflictRowKeyColumn, i.e. the library has no known primary-key column for mapping "our_/their_" prefixed conflict rows to user rows. Only tables registered with a row-key column support per-row resolution; others must be resolved as a whole table.

Source

Thrown at internal/storage/versioncontrolops/conflicts.go:241

// conflictRowKeyColumn support it, and only modify/modify rows (present on
// both sides): a delete/modify or add/add row is refused by name rather than
// guessed at, because "ours" and "theirs" do not describe what the operator
// wants when one side deleted the row.
//
// db must be a SINGLE session (a pinned *sql.Conn, or a *sql.Tx): the
// conflict-tolerance flags set here have to be visible to the writes that
// follow, and dolt refuses to commit a transaction touching a table with live
// conflicts without them.
func ResolveConflictRows(ctx context.Context, db DBConn, table string, keys []string, strategy string) (int, error) {
	if err := ValidateConflictTable(table); err != nil {
		return 0, err
	}
	if err := ValidateConflictStrategy(strategy); err != nil {
		return 0, err
	}
	keyCol, ok := conflictRowKeyColumn[table]
	if !ok {
		return 0, fmt.Errorf("per-row conflict resolution is not supported for table %s; resolve the whole table instead", table)
	}
	if len(keys) == 0 {
		return 0, nil
	}
	// A conflicted table cannot be written — nor the session committed —
	// without dolt's conflict-tolerance flags (the same pair MergeAndSettle
	// sets). They are session state, which is why db must be one session.
	if _, err := db.ExecContext(ctx, "SET @@dolt_allow_commit_conflicts = 1"); err != nil {
		return 0, fmt.Errorf("set dolt_allow_commit_conflicts: %w", err)
	}
	if _, err := db.ExecContext(ctx, "SET @@dolt_force_transaction_commit = 1"); err != nil {
		return 0, fmt.Errorf("set dolt_force_transaction_commit: %w", err)
	}

	resolved := 0
	for _, key := range keys {
		row, err := loadConflictRow(ctx, db, table, keyCol, key)
		if err != nil {

View on GitHub (pinned to 71377f2769)

Solutions

  1. Check the exact supported table name (no schema qualifier, exact case)
  2. Fall back to whole-table resolution (e.g. dolt conflicts resolve / MergeWithStrategy on the table) for unsupported tables
  3. If the table should be supported, file/extend the conflictRowKeyColumn registration in the library
  4. Verify with SupportsRowResolve(table) before calling

Example fix

// before
n, err := ResolveConflictRows(ctx, db, "main.issues", keys, strategy)
// after
if versioncontrolops.SupportsRowResolve("issues") {
    n, err := ResolveConflictRows(ctx, db, "issues", keys, strategy)
} else {
    err := resolveWholeTable(ctx, db, "issues", strategy)
}
Defensive patterns

Strategy: validation

Validate before calling

if !versioncontrolops.SupportsRowResolve(table) {
    return fmt.Errorf("use whole-table resolution for %q", table)
}

Type guard

func canResolveRows(table string) bool {
    return versioncontrolops.SupportsRowResolve(table)
}

Try / catch

n, err := versioncontrolops.ResolveConflictRows(ctx, db, table, keys, strat)
if err != nil && strings.Contains(err.Error(), "per-row conflict resolution is not supported") {
    return resolveWholeTable(ctx, db, table, strat) // fallback path
}

Prevention

When it happens

Trigger: Calling ResolveConflictRows(ctx, db, table, keys, strategy) with a table name that lacks an entry in the library's conflictRowKeyColumn map — a misspelled table name, a table the library doesn't recognize, or a genuinely unsupported table.

Common situations: Passing a table name in different case or with schema qualifier ("main.issues") that misses the map lookup; trying per-row resolution on a table the library supports only at whole-table granularity; calling on a newly added table before the library registers it.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/0a307c576b477d99. Report an issue: GitHub.