Skip to content

Commit

Permalink
Fixed posible faults on rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Dec 10, 2024
1 parent 050e47a commit 3031d7b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,10 @@ void TDqPqRdReadActor::Handle(NFq::TEvRowDispatcher::TEvMessageBatch::TPtr& ev)
ui64 bytes = 0;
for (const auto& message : ev->Get()->Record.GetMessages()) {
const auto& offsets = message.GetOffsets();
YQL_ENSURE(!offsets.empty(), "Expected non empty message batch");
if (offsets.empty()) {
Stop(NDqProto::StatusIds::INTERNAL_ERROR, {TIssue("Got unexpected empty batch from row dispatcher")});
return;
}

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

0 comments on commit 3031d7b

Please sign in to comment.