Skip to content

Commit

Permalink
fix stream lookup bytes calculation (ydb-platform#12026) (ydb-platfor…
Browse files Browse the repository at this point in the history
  • Loading branch information
gridnevvvit authored and zinal committed Dec 3, 2024
1 parent c861790 commit 5734702
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ydb/core/kqp/runtime/kqp_stream_lookup_worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,7 @@ class TKqpLookupRows : public TKqpStreamLookupWorker {
}
}

storageRowSize = std::max(storageRowSize, (i64)8);

if (rowsInBatch && storageRowSize > freeSpace - (i64)resultStats.ResultBytesCount) {
if (rowsInBatch && rowSize > freeSpace - (i64)resultStats.ResultBytesCount) {
row.DeleteUnreferenced();
sizeLimitExceeded = true;
break;
Expand All @@ -388,6 +386,8 @@ class TKqpLookupRows : public TKqpStreamLookupWorker {
batch.push_back(std::move(row));
++rowsInBatch;

storageRowSize = std::max(storageRowSize, (i64)8);

resultStats.ReadRowsCount += 1;
resultStats.ReadBytesCount += storageRowSize;
resultStats.ResultRowsCount += 1;
Expand Down

0 comments on commit 5734702

Please sign in to comment.