Add missing MutexLock to MockEnv::CreateDir (#6474)
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6474 Differential Revision: D20205109 Pulled By: ltamasi fbshipit-source-id: ec136005c63740f5b713ff537b5671ea9b8e217a
This commit is contained in:
parent
17bef7d3a8
commit
48d8d076a3
1
env/mock_env.cc
vendored
1
env/mock_env.cc
vendored
@ -587,6 +587,7 @@ Status MockEnv::Truncate(const std::string& fname, size_t size) {
|
||||
|
||||
Status MockEnv::CreateDir(const std::string& dirname) {
|
||||
auto dn = NormalizePath(dirname);
|
||||
MutexLock lock(&mutex_);
|
||||
if (file_map_.find(dn) == file_map_.end()) {
|
||||
MemFile* file = new MemFile(this, dn, false);
|
||||
file->Ref();
|
||||
|
Loading…
Reference in New Issue
Block a user