Skip to content

Commit 7af3488

Browse files
committed
fix(kqp): always take snapshot for queries with stream lookup
1 parent af9b3a8 commit 7af3488

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ void BuildSequencerChannels(TKqpTasksGraph& graph, const TStageInfo& stageInfo,
365365
}
366366
}
367367

368-
void BuildStreamLookupChannels(TKqpTasksGraph& graph, const TStageInfo& stageInfo, ui32 inputIndex, // TODO
368+
void BuildStreamLookupChannels(TKqpTasksGraph& graph, const TStageInfo& stageInfo, ui32 inputIndex,
369369
const TStageInfo& inputStageInfo, ui32 outputIndex,
370370
const NKqpProto::TKqpPhyCnStreamLookup& streamLookup, bool enableSpilling, const TChannelLogFunc& logFunc)
371371
{

0 commit comments

Comments
 (0)