From 4434b3f32eae74ff417f98e6475f1c59ef58e9cd Mon Sep 17 00:00:00 2001 From: Kaijie Chen Date: Thu, 26 Oct 2023 09:19:59 +0800 Subject: [PATCH] [fix](move-memtable) use pthread mutex in LoadStreamMgr (#25882) --- be/src/runtime/load_stream_mgr.cpp | 4 ++-- be/src/runtime/load_stream_mgr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/be/src/runtime/load_stream_mgr.cpp b/be/src/runtime/load_stream_mgr.cpp index 5c50466290..d1af7b60d3 100644 --- a/be/src/runtime/load_stream_mgr.cpp +++ b/be/src/runtime/load_stream_mgr.cpp @@ -50,7 +50,7 @@ Status LoadStreamMgr::open_load_stream(const POpenStreamSinkRequest* request, UniqueId load_id(request->load_id()); { - std::lock_guard l(_lock); + std::lock_guard l(_lock); auto it = _load_streams_map.find(load_id); if (it != _load_streams_map.end()) { load_stream = it->second; @@ -66,7 +66,7 @@ Status LoadStreamMgr::open_load_stream(const POpenStreamSinkRequest* request, } void LoadStreamMgr::clear_load(UniqueId load_id) { - std::lock_guard l(_lock); + std::lock_guard l(_lock); _load_streams_map.erase(load_id); } diff --git a/be/src/runtime/load_stream_mgr.h b/be/src/runtime/load_stream_mgr.h index 73a14b08f7..da3ae98a42 100644 --- a/be/src/runtime/load_stream_mgr.h +++ b/be/src/runtime/load_stream_mgr.h @@ -53,7 +53,7 @@ public: FifoThreadPool* light_work_pool() { return _light_work_pool; } private: - bthread::Mutex _lock; + std::mutex _lock; std::unordered_map _load_streams_map; std::unique_ptr _file_writer_thread_pool;