Skip to content

Commit 3c162ea

Browse files
authored
[25.2] Sequential reads for BATCH queries (#28906) (#28924)
2 parents 53f4763 + 42f5b86 commit 3c162ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/core/kqp/runtime/kqp_read_actor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class TKqpReadActor : public TActorBootstrapped<TKqpReadActor>, public NYql::NDq
455455
}
456456

457457
bool StartShards() {
458-
const ui32 maxAllowedInFlight = Settings->GetSorted() ? 1 : MaxInFlight;
458+
const ui32 maxAllowedInFlight = Settings->GetSorted() || Settings->GetIsBatch() ? 1 : MaxInFlight;
459459
CA_LOG_D("effective maxinflight " << maxAllowedInFlight << " sorted " << Settings->GetSorted());
460460
bool isFirst = true;
461461
while (!PendingShards.Empty() && RunningReads() + 1 <= maxAllowedInFlight) {
@@ -1052,7 +1052,7 @@ class TKqpReadActor : public TActorBootstrapped<TKqpReadActor>, public NYql::NDq
10521052
ui64 seqNo = record.GetSeqNo();
10531053
Reads[id].RegisterMessage(msg);
10541054

1055-
if (Settings->GetIsBatch() && msg.GetRowsCount() > 0) {
1055+
if (Settings->GetIsBatch() && msg.GetRowsCount() > 0 && BatchOperationMaxRow.GetCells().empty()) {
10561056
auto cells = msg.GetCells(msg.GetRowsCount() - 1);
10571057
BatchOperationMaxRow = TSerializedCellVec{cells};
10581058
}

0 commit comments

Comments
 (0)