-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix contract_tpid_fkey-related race condition (#11330)
* trying to reliably reproduce the template ID constraint error * tentative fix for template ID constraint error * sequential simulation * successfully reproduce the error pre-4633c3137a - Batch entry 0 INSERT INTO some_fancy_prefix_contract VALUES ('foo', 1, 'null'::jsonb, NULL, '{}'::jsonb, ?, ?, '') ON CONFLICT (contract_id) DO NOTHING was aborted: ERROR: insert or update on table "some_fancy_prefix_contract" violates foreign key constraint "some_fancy_prefix_contract_tpid_fkey" Detail: Key (tpid)=(1) is not present in table "some_fancy_prefix_template_id". * also reproduced the error pre-4633c3137a on Oracle - ORA-02291: integrity constraint (UNA3GOHUV7YMSKT0MQXJKLKD9HKKAZ.SYS_C007859) violated - parent key not found * add changelog CHANGELOG_BEGIN - [JSON API] Fixed a rare error that manifested as ‘violates foreign key constraint "contract_tpid_fkey" Detail: Key (tpid)=(...) is not present in table’ when attempting to run queries and goes away on JSON API restart. See `issue #11330 <https://github.com/digital-asset/daml/pull/11330>`__. CHANGELOG_END * clean up some now-unneeded printlns
- Loading branch information
Showing
2 changed files
with
68 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters