Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
upload is not single threaded. Okay, we need to guard it
Browse files Browse the repository at this point in the history
  • Loading branch information
Guihao Liang committed May 18, 2020
1 parent 1fabc03 commit 4c18f55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/storage/fileio/read_caching_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,13 @@ class read_caching_device {
// evict the file size cache
{
std::lock_guard<mutex> file_size_guard(m_filesize_cache_mutex);
m_filename_to_filesize_map.erase(m_filename);

auto iter = m_filename_to_stop_watch.find(m_filename);
if (iter != m_filename_to_stop_watch.end()) {
// use no throw since this nanny thread may not start clock
if (iter->second->stop(/* no throw */ true) == 0) {
// nobody is holding
m_filename_to_stop_watch.erase(iter);
m_filename_to_filesize_map.erase(m_filename);
}
}
}
Expand Down

0 comments on commit 4c18f55

Please sign in to comment.