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

Using PostgreSQL's returning doesn't mark session dirty #2156

Closed
gavlyukovskiy opened this issue Jan 15, 2021 · 2 comments
Closed

Using PostgreSQL's returning doesn't mark session dirty #2156

gavlyukovskiy opened this issue Jan 15, 2021 · 2 comments

Comments

@gavlyukovskiy
Copy link

There is a workaround in #1293 to use select + flushCache=true for queries like INSERT ... RETURNING ..., but it looks like this workaround doesn't behave the same way update does. If you look at DefaultSqlSession it marks session dirty only on update/delete/insert, but not on select meaning that query will not be rolled back.

Currently we have to use copy of DefaultSqlSession (and therefore copy of DefaultSqlSessionFactory) to mitigate this issue by marking session dirty on selects as well. Given that Postgres is quite popular database I assume many people might be affected by that.

@ivanr
Copy link

ivanr commented May 19, 2022

In case this might be useful to you: I reported no rolling back after SELECT here #2363 but the developers said that the situation would be handled at connection pool level. I haven't yet had time to validate.

@harawata
Copy link
Member

Closing as a duplicate of #1189 which is resolved via #2741 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants