Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ydb/core/kqp/common/kqp_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ bool NeedSnapshot(const TKqpTransactionContext& txCtx, const NYql::TKikimrConfig
{
Y_UNUSED(config);

if (*txCtx.EffectiveIsolationLevel != NKikimrKqp::ISOLATION_LEVEL_SERIALIZABLE)
if (*txCtx.EffectiveIsolationLevel != NKikimrKqp::ISOLATION_LEVEL_SERIALIZABLE &&
*txCtx.EffectiveIsolationLevel != NKikimrKqp::ISOLATION_LEVEL_SNAPSHOT_RO)
return false;

if (txCtx.GetSnapshot().IsValid())
Expand Down
3 changes: 1 addition & 2 deletions ydb/core/kqp/common/kqp_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ class TKqpTransactionContext : public NYql::TKikimrTransactionContextBase {
break;

case Ydb::Table::TransactionSettings::kSnapshotReadOnly:
// TODO: (KIKIMR-3374) Use separate isolation mode to avoid optimistic locks.
EffectiveIsolationLevel = NKikimrKqp::ISOLATION_LEVEL_SERIALIZABLE;
EffectiveIsolationLevel = NKikimrKqp::ISOLATION_LEVEL_SNAPSHOT_RO;
Readonly = true;
break;

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/kqp/executer_actor/kqp_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ std::unique_ptr<TEvKqpNode::TEvStartKqpTasksRequest> TKqpPlanner::SerializeReque
request.SetTxId(TxId);
if (LockTxId) {
request.SetLockTxId(*LockTxId);
request.SetLockNodeId(LockNodeId);
}
request.SetLockNodeId(LockNodeId);
ActorIdToProto(ExecuterId, request.MutableExecuterActorId());

if (Deadline) {
Expand Down
1 change: 1 addition & 0 deletions ydb/core/protos/kqp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum EIsolationLevel {
ISOLATION_LEVEL_READ_COMMITTED = 2;
ISOLATION_LEVEL_READ_UNCOMMITTED = 3;
ISOLATION_LEVEL_READ_STALE = 4;
ISOLATION_LEVEL_SNAPSHOT_RO = 5;
};

message TTopicOperationsRequest {
Expand Down
Loading