Skip to content

Fix (again) missing parent dependency#367

Merged
serenaponta merged 1 commit intomasterfrom
missing-dep
Apr 10, 2020
Merged

Fix (again) missing parent dependency#367
serenaponta merged 1 commit intomasterfrom
missing-dep

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.

@serenaponta serenaponta requested a review from henrikplate April 10, 2020 08:27
@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

Comments