Skip to content

Commit eeafc58

Browse files
Merge 7af3488 into 77844b4
2 parents 77844b4 + 7af3488 commit eeafc58

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ydb/core/kqp/common/kqp_tx.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ bool NeedSnapshot(const TKqpTransactionContext& txCtx, const NYql::TKikimrConfig
184184
return true;
185185
}
186186

187+
// We always need snapshot for stream lookup, besause it's used for dependent reads
188+
if (hasStreamLookup) {
189+
return true;
190+
}
191+
187192
// We don't want snapshot when there are effects at the moment,
188193
// because it hurts performance when there are multiple single-shard
189194
// reads and a single distributed commit. Taking snapshot costs

ydb/core/kqp/executer_actor/kqp_tasks_graph.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ bool IsCrossShardChannel(const TKqpTasksGraph& tasksGraph, const TChannel& chann
536536
return false;
537537
}
538538

539-
return targetShard != tasksGraph.GetTask(channel.SrcTask).Meta.ShardId;
539+
ui64 srcShard = tasksGraph.GetTask(channel.SrcTask).Meta.ShardId;
540+
return srcShard && targetShard != srcShard;
540541
}
541542

542543
void TShardKeyRanges::AddPoint(TSerializedCellVec&& point) {

0 commit comments

Comments
 (0)