github-actions[bot] commented on code in PR #62044:
URL: https://github.com/apache/doris/pull/62044#discussion_r3029539332
##########
be/src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:
##########
@@ -553,7 +553,29 @@ void TimeSharingTaskExecutor::_dispatch_thread() {
_running_splits.insert(split);
}
- Result<SharedListenableFuture<Void>> blocked_future_result =
split->process();
+ auto blocked_future_result = [&]() ->
Result<SharedListenableFuture<Void>> {
Review Comment:
Catching `split->process()` here avoids the crash, but it also changes the
scanner control flow in a way that loses the failure signal. For
`ScannerSplitRunner`, the normal error path is inside
`ScannerScheduler::submit()`: the `work_func` lambda catches `_scanner_scan()`
failures, calls `scanner_ref->set_status(status)`, and then
`ctx->push_back_scan_task(scanner_ref)`. That push-back is what decrements
`ScannerContext::_in_flight_tasks_num` and wakes the consumer.
On this new path we skip that entire layer and go straight to
`_split_finished(split, status)`. `ScannerSplitRunner::close()` is empty, so
nothing completes its `_completion_future`, nothing pushes the `ScanTask` back
into the context, and the consumer never sees the error. In practice this can
trade the BE crash for a hung scan, because `submit_scan_task()` increments
`_in_flight_tasks_num` and `push_back_scan_task()` is the only place that
decrements it.
The new unit test does not catch this because `ThrowingSplitRunner::close()`
marks itself finished, which is not how `ScannerSplitRunner` behaves.
--
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]