aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchertus <azuikov@ydb.tech>2023-03-24 17:04:51 +0300
committerchertus <azuikov@ydb.tech>2023-03-24 17:04:51 +0300
commit592893d573feb609a369e392a16db268c39edb80 (patch)
treeb0d94ddf54819ee4c38cbe4f75d4cb7f44828353
parent449eef7f7d0d8e842ff9c107713ba0783b6d8b32 (diff)
downloadydb-592893d573feb609a369e392a16db268c39edb80.tar.gz
do not send empty batches
-rw-r--r--ydb/core/tx/columnshard/columnshard__scan.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/ydb/core/tx/columnshard/columnshard__scan.cpp b/ydb/core/tx/columnshard/columnshard__scan.cpp
index d0c3144fe8..8d3ccc4a36 100644
--- a/ydb/core/tx/columnshard/columnshard__scan.cpp
+++ b/ydb/core/tx/columnshard/columnshard__scan.cpp
@@ -211,6 +211,13 @@ private:
auto& batch = result.ResultBatch;
int numRows = batch->num_rows();
int numColumns = batch->num_columns();
+ if (!numRows) {
+ LOG_TRACE_S(*TlsActivationContext, NKikimrServices::TX_COLUMNSHARD_SCAN,
+ "Scan " << ScanActorId << " producing result: got empty batch"
+ << " txId: " << TxId << " scanId: " << ScanId << " gen: " << ScanGen << " tablet: " << TabletId);
+ return true;
+ }
+
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_COLUMNSHARD_SCAN,
"Scan " << ScanActorId << " producing result: got ready result"
<< " txId: " << TxId << " scanId: " << ScanId << " gen: " << ScanGen << " tablet: " << TabletId