- Notifications
You must be signed in to change notification settings - Fork516
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
Fix #371 savepoint nameing in nested transactions#374
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
An alternate solution would be to change the rollback code to do a rollback followed by a release. |
This seems like a nicer solution than rollback + release, thanks! |
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`.
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.