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 003fdf2b36 [fix](scan) use serial scan thread token only for scan node (#12058) 003fdf2b36 is described below commit 003fdf2b366f1b044f1e28797be360f47851976f Author: Mingyu Chen <morningman....@gmail.com> AuthorDate: Thu Aug 25 14:54:02 2022 +0800 [fix](scan) use serial scan thread token only for scan node (#12058) Only the scan node's limit is less than 1024, we can use serial thread token to submit scanners. Or it will slow down the query. --- be/src/runtime/fragment_mgr.cpp | 13 +++++++++++++ be/src/runtime/fragment_mgr.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp index 60e4d2ffc4..bc5c7bb721 100644 --- a/be/src/runtime/fragment_mgr.cpp +++ b/be/src/runtime/fragment_mgr.cpp @@ -654,6 +654,10 @@ Status FragmentMgr::exec_plan_fragment(const TExecPlanFragmentParams& params, Fi if (params.__isset.fragment && params.fragment.__isset.plan && params.fragment.plan.nodes.size() > 0) { for (auto& node : params.fragment.plan.nodes) { + // Only for SCAN NODE + if (!_is_scan_node(node.node_type)) { + continue; + } if (node.limit > 0 && node.limit < 1024) { concurrency = 1; is_serial = true; @@ -717,6 +721,15 @@ Status FragmentMgr::exec_plan_fragment(const TExecPlanFragmentParams& params, Fi return Status::OK(); } +bool FragmentMgr::_is_scan_node(const TPlanNodeType::type& type) { + return type == TPlanNodeType::OLAP_SCAN_NODE || type == TPlanNodeType::MYSQL_SCAN_NODE || + type == TPlanNodeType::SCHEMA_SCAN_NODE || type == TPlanNodeType::META_SCAN_NODE || + type == TPlanNodeType::BROKER_SCAN_NODE || type == TPlanNodeType::ES_SCAN_NODE || + type == TPlanNodeType::ES_HTTP_SCAN_NODE || type == TPlanNodeType::ODBC_SCAN_NODE || + type == TPlanNodeType::TABLE_VALUED_FUNCTION_SCAN_NODE || + type == TPlanNodeType::FILE_SCAN_NODE; +} + Status FragmentMgr::cancel(const TUniqueId& fragment_id, const PPlanFragmentCancelReason& reason, const std::string& msg) { std::shared_ptr<FragmentExecState> exec_state; diff --git a/be/src/runtime/fragment_mgr.h b/be/src/runtime/fragment_mgr.h index 8db7efcc74..f3341c0795 100644 --- a/be/src/runtime/fragment_mgr.h +++ b/be/src/runtime/fragment_mgr.h @@ -96,6 +96,8 @@ public: private: void _exec_actual(std::shared_ptr<FragmentExecState> exec_state, FinishCallback cb); + bool _is_scan_node(const TPlanNodeType::type& type); + // This is input params ExecEnv* _exec_env; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org