Skip to content

Release R2DBC connection when cleanup fails in transaction #29925

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

Closed
simonbasle opened this issue Feb 3, 2023 · 1 comment
Closed

Release R2DBC connection when cleanup fails in transaction #29925

simonbasle opened this issue Feb 3, 2023 · 1 comment
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: backport An issue that is a backport of another issue to a maintenance branch type: enhancement A general enhancement
Milestone

Comments

@simonbasle
Copy link
Contributor

simonbasle commented Feb 3, 2023

Backport of gh-29703, commit e050c37.

@simonbasle simonbasle added the type: backport An issue that is a backport of another issue to a maintenance branch label Feb 3, 2023
@simonbasle simonbasle added this to the 5.3.26 milestone Feb 3, 2023
@simonbasle simonbasle self-assigned this Feb 3, 2023
simonbasle added a commit that referenced this issue Feb 3, 2023
When using R2dbcTransactionManager, connection will not be released if
it encounters error while doing `afterCleanup` steps. As `afterCleanup`
can use a database connection when doing `setAutoCommit(true)`, it can
fail under some conditions where the connection is not reliable.

This leads to the Connection not being released.

This commit ensures that inner steps of the `doCleanupAfterCompletion`
are protected against errors, logging the errors and continuing the
cleanup until the last step, which releases the connection.

Backport of commit e050c37
See gh-29703
Closes gh-29925

Co-authored-by: Simon Baslé <sbasle@vmware.com>
@simonbasle
Copy link
Contributor Author

Closed by 0851b0f

@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels Feb 14, 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: backport An issue that is a backport of another issue to a maintenance branch type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants