confusing error message for failed transaction with constraint violations
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
When committing a transaction, dolt merges the session's changes into what's already there. If another concurrent transaction makes changes that, when merged with this session's, will result in a constraint violation, we throw this error:
```
Committing this transaction resulted in a working set with constraint violations, transaction rolled back. This constraint violation may be the result of a previous merge or the result of transaction sequencing. Constraint violations from a merge can be resolved using the dolt_constraint_violations table before committing the transaction. To allow transactions to be committed with constraint violations from a merge or transaction sequencing set @@dolt_force_transaction_commit=1.
```
The advice about resolving constraint violations is not applicable to the concurrent use case and is unhelpful and confusing. It's there because the same validation code happens on the `call dolt_merge()` path, where that advice applies. We should have two different tailored error messages for these two different scenarios.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.