diff --git a/db/compact_files_test.cc b/db/compact_files_test.cc index 8f046d14e..051cca8a4 100644 --- a/db/compact_files_test.cc +++ b/db/compact_files_test.cc @@ -50,7 +50,10 @@ class FlushedFileCollector : public EventListener { } return result; } - void ClearFlushedFiles() { flushed_files_.clear(); } + void ClearFlushedFiles() { + std::lock_guard lock(mutex_); + flushed_files_.clear(); + } private: std::vector flushed_files_;