[fix](move-memtable) use pthread mutex in LoadStreamMgr (#25882)

This commit is contained in:
Kaijie Chen
2023-10-26 09:19:59 +08:00
committed by GitHub
parent f3e6bcebd7
commit 4434b3f32e
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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;