This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 858b0c6e8d170f5892892d14aab44bbf30afdc04 Author: wangbo <[email protected]> AuthorDate: Sun Apr 16 18:17:18 2023 +0800 [fix](executor)Fix scanner's _max_thread_num may == 0 #18465 --- be/src/vec/exec/scan/scanner_context.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/be/src/vec/exec/scan/scanner_context.cpp b/be/src/vec/exec/scan/scanner_context.cpp index 7f6cd847bb..952007532e 100644 --- a/be/src/vec/exec/scan/scanner_context.cpp +++ b/be/src/vec/exec/scan/scanner_context.cpp @@ -34,6 +34,8 @@ Status ScannerContext::init() { // should find a more reasonable value. _max_thread_num = std::min(config::doris_scanner_thread_pool_thread_num / 4, (int32_t)_scanners.size()); + _max_thread_num = _max_thread_num == 0 ? 1 : _max_thread_num; + DCHECK(_max_thread_num > 0); // 2. Calculate how many blocks need to be preallocated. // The calculation logic is as follows: --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
