You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/04/16 10:17:25 UTC
[doris] branch master updated: [fix](executor)Fix scanner's _max_thread_num may == 0 #18465
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0f00ad4d2a [fix](executor)Fix scanner's _max_thread_num may == 0 #18465
0f00ad4d2a is described below
commit 0f00ad4d2abcab928e2972dd6431f4838d1d71af
Author: wangbo <wa...@apache.org>
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 a42044f4c1..1c1cd3f73f 100644
--- a/be/src/vec/exec/scan/scanner_context.cpp
+++ b/be/src/vec/exec/scan/scanner_context.cpp
@@ -57,6 +57,8 @@ Status ScannerContext::init() {
// should find a more reasonable value.
_max_thread_num = _state->shared_scan_opt() ? config::doris_scanner_thread_pool_thread_num
: config::doris_scanner_thread_pool_thread_num / 4;
+ _max_thread_num = _max_thread_num == 0 ? 1 : _max_thread_num;
+ DCHECK(_max_thread_num > 0);
_max_thread_num = std::min(_max_thread_num, (int32_t)_scanners.size());
// For select * from table limit 10; should just use one thread.
if (_parent->should_run_serial()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org