This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch tpch500
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/tpch500 by this push:
new 88e9a262b17 modify thread num
88e9a262b17 is described below
commit 88e9a262b173d199e4d92385e390c8e120052619
Author: morningman <[email protected]>
AuthorDate: Sun Dec 31 23:15:59 2023 +0800
modify thread num
---
be/src/pipeline/exec/file_scan_operator.cpp | 6 ++++--
be/src/vec/exec/scan/new_file_scan_node.cpp | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/be/src/pipeline/exec/file_scan_operator.cpp
b/be/src/pipeline/exec/file_scan_operator.cpp
index b0676410caf..47f72f39b2f 100644
--- a/be/src/pipeline/exec/file_scan_operator.cpp
+++ b/be/src/pipeline/exec/file_scan_operator.cpp
@@ -60,9 +60,11 @@ std::string FileScanLocalState::name_suffix() const {
void FileScanLocalState::set_scan_ranges(RuntimeState* state,
const std::vector<TScanRangeParams>&
scan_ranges) {
- int max_scanners =
- config::doris_max_remote_scanner_thread_pool_thread_num /
state->query_parallel_instance_num();
+ int thread_pool_num = (state->query_options().enable_file_cache &&
config::enable_file_cache)
+ ? config::doris_scanner_thread_pool_thread_num :
config::doris_max_remote_scanner_thread_pool_thread_num;
+ int max_scanners = thread_pool_num / state->query_parallel_instance_num();
max_scanners = max_scanners == 0 ? 1 : max_scanners;
+
// For select * from table limit 10; should just use one thread.
if (should_run_serial()) {
max_scanners = 1;
diff --git a/be/src/vec/exec/scan/new_file_scan_node.cpp
b/be/src/vec/exec/scan/new_file_scan_node.cpp
index 2927472115e..543af73f927 100644
--- a/be/src/vec/exec/scan/new_file_scan_node.cpp
+++ b/be/src/vec/exec/scan/new_file_scan_node.cpp
@@ -60,8 +60,9 @@ Status NewFileScanNode::prepare(RuntimeState* state) {
void NewFileScanNode::set_scan_ranges(RuntimeState* state,
const std::vector<TScanRangeParams>&
scan_ranges) {
- int max_scanners =
- config::doris_max_remote_scanner_thread_pool_thread_num /
state->query_parallel_instance_num();
+ int thread_pool_num = (state->query_options().enable_file_cache &&
config::enable_file_cache)
+ ? config::doris_scanner_thread_pool_thread_num :
config::doris_max_remote_scanner_thread_pool_thread_num;
+ int max_scanners = thread_pool_num / state->query_parallel_instance_num();
max_scanners = max_scanners == 0 ? 1 : max_scanners;
// For select * from table limit 10; should just use one thread.
if (should_run_serial()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]