Skip to content

Commit

Permalink
Fix session closure of snapshot isolation transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
jorki02 committed Aug 25, 2024
1 parent 27534f9 commit 9780972
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import tech.ydb.table.values.Value;
import tech.ydb.yoj.repository.BaseDb;
import tech.ydb.yoj.repository.db.Entity;
import tech.ydb.yoj.repository.db.IsolationLevel;
import tech.ydb.yoj.repository.db.RepositoryTransaction;
import tech.ydb.yoj.repository.db.Table;
import tech.ydb.yoj.repository.db.TxOptions;
Expand Down Expand Up @@ -191,7 +192,7 @@ private boolean isFinalActionNeeded(String actionName) {
transactionLocal.log().info("No-op %s: scan tx", actionName);
return false;
}
if (options.isReadOnly()) {
if (options.isReadOnly() && options.getIsolationLevel() != IsolationLevel.SNAPSHOT) {
transactionLocal.log().info("No-op %s: read-only tx @%s", actionName, options.getIsolationLevel());
return false;
}
Expand Down

0 comments on commit 9780972

Please sign in to comment.