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

R2DBC: Skip release connection after nested with existing transaction #31133

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

christophejan
Copy link
Contributor

Following #30134

Switching from my dirty workarround implementation of r2dbc nested transaction to new build-in, I got some test case failure.

After digging, I realize that outer transaction state was lost after completing a nested transaction with existing transaction (i.e. one using a savepoint) through R2dbcTransactionManager#doCleanupAfterCompletion that call ConnectionFactoryUtils#releaseConnection and ConnectionHolder#clear.

This PR try to fix that.

@jhoeller : It would be great if you may have a look (You may see something I miss) ; And thanks a lot for #30134 !

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 30, 2023
@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 5, 2023
@jhoeller jhoeller added this to the 6.0.12 milestone Sep 5, 2023
@jhoeller jhoeller self-assigned this Sep 5, 2023
@jhoeller jhoeller changed the title Skip release connection after nested with existing transaction R2DBC: Skip release connection after nested with existing transaction Sep 5, 2023
@jhoeller jhoeller merged commit 8d4ea72 into spring-projects:main Sep 11, 2023
jhoeller added a commit that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants