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

ReadOnly transactions does not honor isolation-level #3407

Open
rPraml opened this issue May 17, 2024 · 1 comment
Open

ReadOnly transactions does not honor isolation-level #3407

rPraml opened this issue May 17, 2024 · 1 comment

Comments

@rPraml
Copy link
Contributor

rPraml commented May 17, 2024

Expected behavior

If a method is annotated with @Transactional(readOnly = true, isolation = TxIsolation.READ_UNCOMMITTED) the isolation level should be set

Actual behavior

You get a readonly-transaction with READ_COMMITTED
See: https://github.com/ebean-orm/ebean/blob/master/ebean-core/src/main/java/io/ebeaninternal/server/transaction/TransactionManager.java#L275

Use case

We have update locks on certain tables, but we do not want to block our user interface too much, so the idea is, to execute certain queries with READ_UNCOMMITTED - but I noticed, that it won't work when using the readonly connection

Question

Is this intended or a bug

Workaround

do not use readonly connection

@rbygrave
Copy link
Member

Is this intended or a bug

It's currently more a function that the databases I want to use don't support READ_UNCOMMITTED at all. Right now I'd be thinking that it is only useful for DB2. I wonder about the utility of supporting it.

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

2 participants