Skip to content

Commit 3031d7b

Browse files
committed
Fixed posible faults on rollback
1 parent 050e47a commit 3031d7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ydb/library/yql/providers/pq/async_io/dq_pq_rd_read_actor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,10 @@ void TDqPqRdReadActor::Handle(NFq::TEvRowDispatcher::TEvMessageBatch::TPtr& ev)
762762
ui64 bytes = 0;
763763
for (const auto& message : ev->Get()->Record.GetMessages()) {
764764
const auto& offsets = message.GetOffsets();
765-
YQL_ENSURE(!offsets.empty(), "Expected non empty message batch");
765+
if (offsets.empty()) {
766+
Stop(NDqProto::StatusIds::INTERNAL_ERROR, {TIssue("Got unexpected empty batch from row dispatcher")});
767+
return;
768+
}
766769

767770
activeBatch.Data.emplace_back(ev->Get()->GetPayload(message.GetPayloadId()));
768771
bytes += activeBatch.Data.back().GetSize();

0 commit comments

Comments
 (0)