HappenLee opened a new pull request, #66107: URL: https://github.com/apache/doris/pull/66107
### What problem does this PR solve? Problem Summary: Cherry-pick "Boost scanner concurrency under starvation" from opt_perf_4.1 (commit 3d74daa9488) to branch-4.1. Previously, each scan operator only guaranteed `_min_scan_concurrency` running scanners, so when downstream was starving (no data in the queue but scan tasks were still running/pending), scan concurrency could not scale up and the pipeline was under-utilized. This change introduces a `_scan_starving` flag: when a scan context is starving, `_get_margin` targets `_max_scan_concurrency` instead of `_min_scan_concurrency`, letting the scanner scheduler refill up to max concurrency. It also changes `ScannerScheduler::default_min_active_scan_threads` from `CpuInfo::num_cores() * 2` to `default_local_scan_thread_num()`, adjusts related session variable defaults, and adds unit tests. ### Release note None ### Check List (For Author) - Test: Unit Test (scanner_context_test.cpp included in the cherry-pick) - Behavior changed: No - Does this need documentation: No -- 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]
