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

Optimize Connection.setReadOnly(false) in DataSourceUtils.resetConnectionAfterTransaction(…) #23747

Closed
mp911de opened this issue Oct 2, 2019 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Oct 2, 2019

Currently, DataSourceUtils.resetConnectionAfterTransaction(…) queries the isReadOnly() state from the given JDBC Connection to disable read-only mode if isReadOnly() returns true. Ideally, the read-only state should be reset only if transaction attributes indicated to enable read-only mode (similar to isolation level and auto-commit).

Some JDBC drivers (e.g. H2) reach out to the database to query the state and we could skip this interaction.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 2, 2019
@jhoeller jhoeller self-assigned this Oct 2, 2019
@jhoeller jhoeller added type: enhancement A general enhancement in: data Issues in data modules (jdbc, orm, oxm, tx) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 2, 2019
@jhoeller jhoeller added this to the 5.1.11 milestone Oct 2, 2019
@rstoyanchev rstoyanchev modified the milestones: 5.1.11, 5.2.1 Oct 15, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x labels Oct 15, 2019
@jhoeller jhoeller removed the status: backported An issue that has been backported to maintenance branches label Oct 29, 2019
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: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants