Skip to content

Commit 1319eff

Browse files
authored
DPL: avoid hiding the actual issue (#15367)
1 parent fb65f6e commit 1319eff

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Framework/Core/src/DataAllocator.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ void DataAllocator::adopt(const Output& spec, LifetimeHolder<FragmentToBatch>& f
264264
// get rid of the intermediate tree 2 table object, saving memory.
265265
auto batch = source.finalize();
266266
if (!batch) {
267-
throw std::runtime_error("FragmentToBatch::finalize() returned null RecordBatch");
267+
// Do not throw here: this callback runs from ~LifetimeHolder which may
268+
// execute during stack unwinding (e.g. if fill() failed). Throwing during
269+
// unwinding calls std::terminate.
270+
LOG(error) << "FragmentToBatch::finalize() returned null RecordBatch, skipping serialization";
271+
return;
268272
}
269273
auto mock = std::make_shared<arrow::io::MockOutputStream>();
270274
int64_t expectedSize = 0;

0 commit comments

Comments
 (0)