This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit e81b04c82613aa79e17ed25005bea9c94b329669 Author: Pxl <[email protected]> AuthorDate: Sat Jul 29 12:45:50 2023 +0800 [Bug](profile) add lock on add_filter_info #22355 multiple scanner may update profile at same time --- be/src/vec/exec/scan/new_olap_scan_node.cpp | 1 + be/src/vec/exec/scan/new_olap_scan_node.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/be/src/vec/exec/scan/new_olap_scan_node.cpp b/be/src/vec/exec/scan/new_olap_scan_node.cpp index f12533431f..d53094b73c 100644 --- a/be/src/vec/exec/scan/new_olap_scan_node.cpp +++ b/be/src/vec/exec/scan/new_olap_scan_node.cpp @@ -657,6 +657,7 @@ bool NewOlapScanNode::_is_key_column(const std::string& key_name) { } void NewOlapScanNode::add_filter_info(int id, const PredicateFilterInfo& update_info) { + std::unique_lock lock(_profile_mtx); // update _filter_info[id].filtered_row += update_info.filtered_row; _filter_info[id].input_row += update_info.input_row; diff --git a/be/src/vec/exec/scan/new_olap_scan_node.h b/be/src/vec/exec/scan/new_olap_scan_node.h index fac6997c9d..8cfa08131d 100644 --- a/be/src/vec/exec/scan/new_olap_scan_node.h +++ b/be/src/vec/exec/scan/new_olap_scan_node.h @@ -190,6 +190,8 @@ private: RuntimeProfile::Counter* _filtered_segment_counter = nullptr; // total number of segment related to this scan node RuntimeProfile::Counter* _total_segment_counter = nullptr; + + std::mutex _profile_mtx; }; } // namespace doris::vectorized --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
