Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error saving concept set #2430

Open
chrisknoll opened this issue Feb 26, 2025 · 0 comments
Open

Error saving concept set #2430

chrisknoll opened this issue Feb 26, 2025 · 0 comments
Milestone

Comments

@chrisknoll
Copy link
Collaborator

Users in the Atlas are getting an error when attempting to save a concept set expression.

When looking at the logs:

Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into webapi.concept_set_version (archived, asset_json, comment, created_by_id, created_date, asset_id, version) values (('FALSE'::boolean), ('[]'), (NULL), ('1025'::int8), ('2025-02-26 15:11:02.313+00'), ('9356'::int8), ('1'::int4)) was aborted: ERROR: insert or update on table "concept_set_version" violates foreign key constraint "fk_concept_set_version_asset_id"
  Detail: Key (asset_id)=(9356) is not present in table "concept_set".  Call getNextException to see other errors in the batch.

sampleJson.txt

Steps to reproduce:

  1. Create a new concept set
  2. Go to Import tab and use the above JSON to import
  3. Change the name to 'Save Error Test' and click save
  4. Observe: concept set saves
  5. Change the name to 'Save Error Test RENAME
  6. Observe error in logs

Note: This is not always reproducable. It is unclear if there's a sync issue between the versioning of the asset or a race condition of saving of the asset: is it possible that while the versioning save is being done, the save operation of the concept set is ongoing which leads to a delete-insert of the data while the version is looking for the foreign key?

@chrisknoll chrisknoll added this to the v2.15 milestone Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant