ebean icon indicating copy to clipboard operation
ebean copied to clipboard

ReadOnly transactions does not honor isolation-level

Open rPraml opened this issue 9 months ago • 1 comments

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

rPraml avatar May 17 '24 08:05 rPraml