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

Fix (again) missing parent dependency #367

Merged
merged 1 commit into from
Apr 10, 2020
Merged

Fix (again) missing parent dependency #367

merged 1 commit into from
Apr 10, 2020

Conversation

serenaponta
Copy link
Contributor

The Internal Server Error "Missing Dependency with id XYZ" is still occurring as PR #355 didn't solve the problem entirely (it mainly prevents the multiplication of dependencies).

The error occurs when several scans of the same application are run in parallel. It can be reproduced triggering several time the HTTP requests corresponding to the goals CLEAN and APP. In particular, it consistently occur when running 7 times the pair of calls to clean (POST) and save the app (PUT).
The "missing dependency" issue occurs at the end of the parallel calls, whereas during their execution we get different exceptions: constraint violation on app_constricts_pk (when saving the same application in parallel) and optimisticLocking exception (when saving entities that were updated or deleted in parallel).

Solution:
We add the transactional annotation to the customSave method of ApplicationRepositoryImpl.class so that changes are rolledback if something goes wrong.

@henrikplate
Copy link
Contributor

Great to see that you were able to reproduce, thank you!

@serenaponta serenaponta merged commit e2c21c6 into master Apr 10, 2020
@serenaponta serenaponta deleted the missing-dep branch April 10, 2020 11:58
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

Successfully merging this pull request may close these issues.

2 participants