mrhhsg commented on code in PR #68610:
URL: https://github.com/apache/doris/pull/68610#discussion_r4266849660
##########
be/src/runtime/exec_env.h:
##########
@@ -402,6 +402,7 @@ class ExecEnv {
RowCache* get_row_cache() { return _row_cache; }
CacheManager* get_cache_manager() { return _cache_manager; }
IdManager* get_id_manager() { return _id_manager; }
+ void set_id_manager(IdManager* id_manager) { this->_id_manager =
id_manager; }
Review Comment:
Fixed in 0b1557a5d0f. `set_id_manager()` is moved into the existing `#ifdef
BE_TEST` block of `ExecEnv`, next to the other test-only setters, so it does
not exist in a production build.
##########
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
Review Comment:
Agreed, changed in 0b1557a5d0f.
The shared-LIMIT condition in `ScannerContext::can_admit_scan_task()` is
removed, so thread pool admission only applies the concurrency limit again, as
on master, and no longer depends on `_in_flight_tasks_num` / `_completed_tasks`
for this decision. Pending scanners are scheduled as usual after the LIMIT is
exhausted.
Instead, `Scanner::get_block_after_projects()` checks the shared LIMIT
before it reads anything: when the counter is already at or below zero, it sets
`eos` and returns an empty block without reading its range. The admitted
scanner then finishes through the normal EOS path (`_num_finished_scanners`),
so the context does not need any extra rule to make progress.
Tests: `ScannerContextTest.thread_pool_admission_ignores_shared_limit` (a
pending scanner is still admitted with the counter at 0 while a task is in
flight and a completed result is waiting) and
`ScannerProjectionTest.shared_limit_exhausted_before_call_reports_eos_without_reading`
(the scanner reports EOS with an empty block and leaves its source blocks
unread). `ScannerProjectionTest.*`, `ScannerContextTest.*` and the other
scanner suites pass, and `query_p0/limit` plus
`correctness_p0/test_shared_scan_limit_pending_tasks` pass on a local cluster
with the thread pool scheduler as default.
--
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]