The conflict resolvers read res.RowsAffected()==0 after their UPDATE as
proof the row had been deleted concurrently, and aborted the whole merge
saying so. But doltutil/dsn.go sets parseTime and multiStatements and NOT
clientFoundRows, so RowsAffected is rows CHANGED, not rows MATCHED: a
merged write the backend normalizes to the bytes already stored reports
zero exactly as a vanished row does, and a correct merge died on a
message about a deletion that never happened.
Ask instead. conflictTargetStillPresent is the matched-rows check both
sites lacked, and it covers the operator path too — resolveOneConflictRow
(bd conflicts resolve --theirs <id>) carried the identical conflation,
where a misleading abort is worse because the operator named the row. It
confirms only that the key still resolves to a row, which is the honest
postcondition: comparing the written values would reintroduce the very
normalization sensitivity this exists to absorb. A check that cannot be
run refuses rather than clearing a conflict it could not confirm.
Second half: the bulk load never rejected duplicate conflict rows sharing
one our-side key the way loadConflictRow does for the single-row path. If
dolt ever emits two, the first DELETE ... WHERE our_id = ? clears both
and the next iteration aborts on "no conflict row deleted" — again a
message about the wrong thing, after a row was resolved without ever
being merged. duplicateConflictKey now catches that shape, and the
pre-screens DECLINE on it rather than erroring: an error out of
issuesConflictsAreFieldMergeable is swallowed by SettleMerge's abort path
and would turn a reportable conflict into an opaque pull failure, where a
decline still builds the MergeConflictsError that names the tables an
operator has to look at. Rows whose our side is NULL (delete/modify) are
skipped — they are never the target of a keyed delete.
Neither shape is known to fire today; both were left unfixed at the tail
of the wy-jpd3.6 diff (F7) rather than patched in a hurry.