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

api: enable savepoints for transactions #3843

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Sep 25, 2023

We use nested transactions in our tests to roll back the changes made in the tests.
Doing this without enabling savepoints is deprecated and will be removed in doctrine/orm 3.0.

This adds 2 queries to every request in the tests:

  • SAVEPOINT DOCTRINE2_SAVEPOINT_2
  • RELEASE SAVEPOINT DOCTRINE2_SAVEPOINT_2

closes #3741

We use nested transactions in our tests to roll back the changes made
in the tests.
Doing this without enabling savepoints is deprecated and will be removed in doctrine/orm 3.0.

This adds 2 queries to every request in the tests:
- SAVEPOINT DOCTRINE2_SAVEPOINT_2
- RELEASE SAVEPOINT DOCTRINE2_SAVEPOINT_2

closes ecamp#3741
Copy link
Member

@manuelmeister manuelmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this change generate more sql queries?

@carlobeltrame
Copy link
Member

Why does this change generate more sql queries?

I think it probably adds a SAVEPOINT foobar; query at the beginning and a RELEASE SAVEPOINT foobar; in the end of the request.

@BacLuc
Copy link
Contributor Author

BacLuc commented Sep 26, 2023

Why does this change generate more sql queries?

Sorry, did update the commit message, but not the PR description.
@carlobeltrame is right

@usu usu added this pull request to the merge queue Sep 28, 2023
Merged via the queue into ecamp:devel with commit 38927c3 Sep 28, 2023
26 checks passed
@BacLuc BacLuc deleted the api-enable-savepoints branch December 23, 2023 19:14
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.

Fix "Nesting transactions without enabling savepoints is deprecated."
4 participants