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 a1a75fcfbdc [fix](runtime filter) Fix extremely high CPU usage caused by rf merge #27894 a1a75fcfbdc is described below commit a1a75fcfbdccf4d7c097d4df03ecbed3ea9a3826 Author: zhiqiang <seuhezhiqi...@163.com> AuthorDate: Sat Dec 2 07:40:52 2023 +0800 [fix](runtime filter) Fix extremely high CPU usage caused by rf merge #27894 --- be/src/runtime/runtime_filter_mgr.cpp | 7 +++---- be/src/runtime/runtime_filter_mgr.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/be/src/runtime/runtime_filter_mgr.cpp b/be/src/runtime/runtime_filter_mgr.cpp index 6ae42ae80ae..cedfe8d1a06 100644 --- a/be/src/runtime/runtime_filter_mgr.cpp +++ b/be/src/runtime/runtime_filter_mgr.cpp @@ -40,7 +40,6 @@ #include "runtime/runtime_state.h" #include "runtime/thread_context.h" #include "util/brpc_client_cache.h" -#include "util/spinlock.h" namespace doris { @@ -221,7 +220,7 @@ Status RuntimeFilterMergeControllerEntity::_init_with_desc( // LOG(INFO) << "entity filter id:" << filter_id; static_cast<void>( cntVal->filter->init_with_desc(&cntVal->runtime_filter_desc, query_options, -1, false)); - _filter_map.emplace(filter_id, CntlValwithLock {cntVal, std::make_unique<SpinLock>()}); + _filter_map.emplace(filter_id, CntlValwithLock {cntVal, std::make_unique<std::mutex>()}); return Status::OK(); } @@ -243,7 +242,7 @@ Status RuntimeFilterMergeControllerEntity::_init_with_desc( auto filter_id = runtime_filter_desc->filter_id; // LOG(INFO) << "entity filter id:" << filter_id; static_cast<void>(cntVal->filter->init_with_desc(&cntVal->runtime_filter_desc, query_options)); - _filter_map.emplace(filter_id, CntlValwithLock {cntVal, std::make_unique<SpinLock>()}); + _filter_map.emplace(filter_id, CntlValwithLock {cntVal, std::make_unique<std::mutex>()}); return Status::OK(); } @@ -317,7 +316,7 @@ Status RuntimeFilterMergeControllerEntity::merge(const PMergeFilterRequest* requ // iter->second = pair{CntlVal,SpinLock} cntVal = iter->second.first; { - std::lock_guard<SpinLock> l(*iter->second.second); + std::lock_guard<std::mutex> l(*iter->second.second); MergeRuntimeFilterParams params(request, attach_data); ObjectPool* pool = cntVal->pool.get(); RuntimeFilterWrapperHolder holder; diff --git a/be/src/runtime/runtime_filter_mgr.h b/be/src/runtime/runtime_filter_mgr.h index ff089a7a1ff..939ee2c8139 100644 --- a/be/src/runtime/runtime_filter_mgr.h +++ b/be/src/runtime/runtime_filter_mgr.h @@ -170,7 +170,7 @@ private: std::shared_mutex _filter_map_mutex; std::shared_ptr<MemTracker> _mem_tracker; using CntlValwithLock = - std::pair<std::shared_ptr<RuntimeFilterCntlVal>, std::unique_ptr<SpinLock>>; + std::pair<std::shared_ptr<RuntimeFilterCntlVal>, std::unique_ptr<std::mutex>>; std::map<int, CntlValwithLock> _filter_map; RuntimeState* _state = nullptr; bool _opt_remote_rf = true; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org