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

Outline transactions idea #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

svenseeberg
Copy link
Member

No description provided.

@svenseeberg
Copy link
Member Author

svenseeberg commented Dec 28, 2023

Discussion results:

  • The problem with the current DB mutex is that read operations that precede the write operations can contain outdated information due to race conditions. We would have to include SELECT FOR UPDATE in the transactions.
  • Currently there are no transactions and therefore no (deferrable) constraints
  • We could replace the raw queries with ORM calls, do performance tests, and compare both implementations. This would enable us to implement deferrable constraints and transactions which would guarantee a consistent table after the transaction is complete.
  • We can add BEGIN and COMMIT statements only to the raw queries. That would also allow to add deferrable constraints. The transaction would then not span multiple queries (for example object saves) but most likely cover most of the occurring problems. Works in Add deferrable Page tree constraints integreat-cms#2596
  • Another option would be to connect treebeard to the Django ORM so that Treebeard operations are somehow connected to atomic ORM operations.
  • We should add a single root node for each region to avoid constantly changing tree IDs.

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.

1 participant