mrhhsg commented on code in PR #68610:
URL: https://github.com/apache/doris/pull/68610#discussion_r4266851280
##########
be/src/exec/scan/scanner_context.cpp:
##########
@@ -604,6 +604,14 @@ bool ScannerContext::can_admit_scan_task(const
std::unique_lock<std::mutex>& tra
if (done() || _pending_tasks.empty()) {
return false;
}
+ // Same rule as _pull_next_scan_task() on the TaskExecutor path: once the
shared LIMIT is
+ // exhausted, pending scanners would only open and immediately report EOS,
so do not admit
+ // them while a completed or in-flight task can still wake the operator.
If neither exists,
+ // admit one so it can report EOS and wake the pipeline task.
+ if (_is_shared_scan_limit_exhausted() &&
Review Comment:
Agreed. The admission condition this PR had added on `_in_flight_tasks_num`
/ `_completed_tasks` is removed in 0b1557a5d0f (see the thread above); an
admitted scanner now reports EOS itself in
`Scanner::get_block_after_projects()` once the shared LIMIT is exhausted.
The block quoted here is the existing finish check in
`ScannerContext::get_block_from_queue()` on master (from #65814). This PR does
not change it, so the thread pool path gains no new dependency on those
counters.
--
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]