Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix #371 savepoint nameing in nested transactions#374

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

rustonaut
Copy link

Rolling back to a savepoint doesn't release it so,
reusing the same name in nested transaction means
inner transactions only roll back to the
most transaction/last savepoint.

If the outer most transaction commits but did multiple
consecutive rollbacks in the nested transactions this
did cause an unexpected state in the database before
the fix.

Philipp Korber added2 commitsSeptember 25, 2018 15:21
Rolling back to a savepoint doesn't release it so,reusing the same name in nested transaction meansinner transactions only roll back to themost transaction/last savepoint.If the outer most transaction commits but did multipleconsecutive rollbacks in the nested transactions thisdid cause an unexpected state in the database beforethe fix.
@rustonaut
Copy link
Author

An alternate solution would be to change the rollback code to do a rollback followed by a release.
But this would get in the way for adding functionality for people allowing the full usage of savepoints.
I.e. adding arollback_and_retry functionality (which rolls back the transaction and restarts it, expect that it's "just" a rollback as we have savepoints and not nested transactions).

@rustonautrustonaut changed the titleFix 371 savepoint nameing in nested transactionsFix #371 savepoint nameing in nested transactionsSep 25, 2018
@sfackler
Copy link
Collaborator

This seems like a nicer solution than rollback + release, thanks!

@sfacklersfackler merged commit86b65aa intorust-postgres:masterSep 26, 2018
nvb added a commit to nvb/rust-postgres that referenced this pull requestMay 1, 2020
Revivesrust-postgres#184.The rewrite for async/await and Tokio accidentally lost functionalitythat allowed users to assign specific names to savepoints when usingnested transactions. This functionality had originally been addedinrust-postgres#184 and had been updated inrust-postgres#374.This commit revives this functionality using a similar scheme to theone that existed before. This should allow CockroachDB users to updateto the next patch release of version `0.17`.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@rustonaut@sfackler

[8]ページ先頭

©2009-2025 Movatter.jp