From 48d8d076a3920132dffc2b7e04addb58fcebf474 Mon Sep 17 00:00:00 2001 From: sumeerbhola Date: Mon, 2 Mar 2020 20:49:27 -0800 Subject: [PATCH] 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 --- env/mock_env.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/env/mock_env.cc b/env/mock_env.cc index c246c13e1..ab249bbb8 100644 --- a/env/mock_env.cc +++ b/env/mock_env.cc @@ -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();