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

[4.1] 1931923: API-level product/content updates no longer occur in parallel (CANDLEPIN-440) #3681

Merged

Conversation

Ceiu
Copy link
Contributor

@Ceiu Ceiu commented Nov 16, 2022

  • Changed the ProductManager and ContentManager to obtain pessimistic write locks before making any change or removal of products or content
  • Moved several org-less content and product queries from the OwnerContentCurator or OwnerProductCurator to the ContentCurator or ProductCurator as appropriate
  • Changed the output from several curator methods from lists of tuples to maps of collections to better convey exactly what was being returned and to make it easier to follow during analysis
  • The OrphanCleanupJob no longer removes content that is referenced by a non-orphaned product or an environment, even in cases where the content is technically orphaned (bad content mapping)
  • Added a DB-level delete cascade on Content.modifiedProductIds, as JPA is inexplicably unwilling or unable to cascade a deletion on the parent entity to an element collection when using JPA bulk deletions
  • Removed some unused curator methods

@nikosmoum nikosmoum requested review from a team and bakajstep and removed request for a team November 16, 2022 18:17
@Ceiu
Copy link
Contributor Author

Ceiu commented Nov 16, 2022

This is cherry-picked from the 4.2 version of this change, so reviewers should look for things that may be unintentional changes from merge/cherry-pick artifacts.

@Ceiu Ceiu marked this pull request as draft November 17, 2022 14:27
@Ceiu
Copy link
Contributor Author

Ceiu commented Nov 17, 2022

This is blocked pending on details of the deadlock issue discovered in the master version of this patch. Once that update is accepted, this PR will be updated accordingly.

- Changed the ProductManager and ContentManager to obtain pessimistic
  write locks before making any change or removal of products or content
- Moved several org-less content and product queries from the
  OwnerContentCurator or OwnerProductCurator to the ContentCurator or
  ProductCurator as appropriate
- Changed the output from several curator methods from lists of tuples
  to maps of collections to better convey exactly what was being
  returned and to make it easier to follow during analysis
- The OrphanCleanupJob no longer removes content that is referenced
  by a non-orphaned product or an environment, even in cases where the
  content is technically orphaned (bad content mapping)
- Added a DB-level delete cascade on Content.modifiedProductIds, as
  JPA is inexplicably unwilling or unable to cascade a deletion on
  the parent entity to an element collection when using JPA bulk
  deletions
- Removed some unused curator methods
@Ceiu Ceiu force-pushed the crog/4.1/update_versioned_entity_locking branch from 22adf2a to e31688d Compare November 17, 2022 21:49
@Ceiu Ceiu marked this pull request as ready for review November 17, 2022 21:50
@nikosmoum nikosmoum requested a review from a team November 17, 2022 21:50
@nikosmoum nikosmoum merged commit 6beeb08 into candlepin-4.1-HOTFIX Nov 18, 2022
2 checks passed
@nikosmoum nikosmoum deleted the crog/4.1/update_versioned_entity_locking branch November 18, 2022 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants