-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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 Connection is closed during transaction when using TransactionAwareConnectionFactoryProxy #28133
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Mar 3, 2022
I have exactly the same problem on Spring Boot 2.7.0, and came to the same conclusion.
Here transactional connection is closed, when it shouldn't have been. |
@mp911de would you have some cycle to look at this? I can reproduce the issue using a recent version. With Spring Boot
|
jhoeller
added
type: bug
A general bug
and removed
status: waiting-for-triage
An issue we've not yet triaged or decided on
labels
Oct 11, 2023
github-actions
bot
added
status: backported
An issue that has been backported to maintenance branches
and removed
for: backport-to-5.3.x
labels
Oct 11, 2023
jhoeller
added a commit
that referenced
this issue
Oct 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)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
summary of problem
It seems that
org.springframework.r2dbc.connection.TransactionAwareConnectionFactoryProxy
closes a connection during transaction.When using
TransactionAwareConnectionFactoryProxy
, the following exception is thrown:To get full stacktrace, see the README of the reproducible project.
version
Spring Framework 5.3.16
Spring Boot 2.6.4
reproducible project
https://github.com/nakamura-to/issue-spring-r2dbc-connection
To reproduce the issue, execute
./gradlew bootRun
and accesshttp://localhost:8080/ng
.solution
I think this issue could be solved by returning
Mono.empty()
instead ofMono.from(connection.close())
during transaction execution.https://github.com/spring-projects/spring-framework/blob/v5.3.16/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/ConnectionFactoryUtils.java#L177-L181
The text was updated successfully, but these errors were encountered: