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

Move ancestors recalculation back into initiating transactions + more granular locking during ancestors recalculation #1195

Merged
merged 20 commits into from
Oct 16, 2024

Conversation

zenovich
Copy link
Collaborator

As the first step of #1181, here we make items/groups propagations always synchronous and move them back into initiating transactions.

  1. Move ancestors recalculation back into initiating transactions (revert changes from Propagations step by step after transaction #1058 related to groups/items ancestors recalculation, the first 12 commits of this PR).
  2. Fix the code and tests.
  3. Make locking in DataStore.createNewAncestors() more granular, allow concurrent sessions to read from groups_groups/items_items,groups/items during the ancestors recalculation.
  4. Remove an unnecessary join from the first SQL query of DataStore.createNewAncestors().

…e transaction of CreateRelation."

This reverts commit da99786.
…transaction, we need to close the transaction that was made just for the propagation before we do another operation."

This reverts commit 8c3dda5.
…ransaction and fails. Let's see if we really have failed tests when doing this."

This reverts commit 2a94144.
…agation, because we want to split it into multiple transactions."

This reverts commit d7e1b30.
…cestors and permissions are now scheduled instead of being done in the current transaction."

This reverts commit 2cc9273.
…ion) "`createItem` and `updateItem`: schedule the items ancestors propagation instead of doing it in the flow."

This reverts commit 06e4b65.
… we do not split them into separatate transactions anymore
…oncurrent sessions to read from groups_groups/items_items,groups/items during the ancestors recalculation
@zenovich zenovich requested a review from smadbe October 16, 2024 05:19
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4c7f87) to head (562b0a5).
Report is 21 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1195   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          237       237           
  Lines        14675     14660   -15     
=========================================
- Hits         14675     14660   -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zenovich zenovich merged commit f92e6af into master Oct 16, 2024
4 checks passed
@zenovich zenovich deleted the move_ancestors_prop_back_into_tx branch October 16, 2024 08:12
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