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 4434b3f32ea [fix](move-memtable) use pthread mutex in LoadStreamMgr
(#25882)
4434b3f32ea is described below
commit 4434b3f32eae74ff417f98e6475f1c59ef58e9cd
Author: Kaijie Chen <[email protected]>
AuthorDate: Thu Oct 26 09:19:59 2023 +0800
[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 5c504662901..d1af7b60d3f 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<decltype(_lock)> 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<decltype(_lock)> 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 73a14b08f72..da3ae98a42e 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<UniqueId, LoadStreamSharedPtr> _load_streams_map;
std::unique_ptr<ThreadPool> _file_writer_thread_pool;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]