github-actions[bot] commented on code in PR #68495:
URL: https://github.com/apache/doris/pull/68495#discussion_r4100009505
##########
be/src/exec/sort/sort_cursor.h:
##########
@@ -159,7 +159,7 @@ struct BlockSupplierSortCursorImpl : public
MergeSortCursorImpl {
}
block->clear();
THROW_IF_ERROR(_block_supplier(block.get(), &_is_eof));
- DCHECK(!block->empty() or _is_eof);
+ DORIS_CHECK(!block->empty() || _is_eof);
Review Comment:
[P1] Preserve a catch boundary for refill checks
`DORIS_CHECK` throws a `doris::Exception` in release builds. Initial cursor
fetches are caught by `VSortedRunMerger::prepare`, and pipeline refill calls
are caught by `TaskScheduler`, but sorted Iceberg partition close runs
`_combine_files_output()` / `_do_intermediate_merge()` from
`AsyncResultWriter`'s generic thread-pool task. Those paths call
`VSortedRunMerger::get_next()` for later refills without any catch, and neither
the writer lambda nor `ThreadPool` catches exceptions. If this invariant fires
there (for example, a valid first spill block followed by a malformed
zero-length entry), the exception crosses the thread entry and invokes
`std::terminate`, crashing the BE instead of reporting the query error
described by this PR. Please catch and convert refill exceptions centrally in
`VSortedRunMerger::get_next()` (covering both refill sites), and add a
release-mode test with a valid first block followed by an empty non-EOF block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]