From 23295b74b665d94114b20409ec0636e550f581b9 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Fri, 14 Nov 2014 16:57:17 -0800 Subject: [PATCH] Clean job_context --- db/db_filesnapshot.cc | 1 + db/flush_job_test.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/db/db_filesnapshot.cc b/db/db_filesnapshot.cc index c35d8e796..a442c68b2 100644 --- a/db/db_filesnapshot.cc +++ b/db/db_filesnapshot.cc @@ -69,6 +69,7 @@ Status DBImpl::EnableFileDeletions(bool force) { if (should_purge_files) { PurgeObsoleteFiles(job_context); } + job_context.Clean(); LogFlush(db_options_.info_log); return Status::OK(); } diff --git a/db/flush_job_test.cc b/db/flush_job_test.cc index 0fa5b4e57..33d1abe86 100644 --- a/db/flush_job_test.cc +++ b/db/flush_job_test.cc @@ -85,6 +85,7 @@ TEST(FlushJobTest, Empty) { SequenceNumber(), &job_context, nullptr, nullptr, kNoCompression, nullptr); ASSERT_OK(flush_job.Run()); + job_context.Clean(); } TEST(FlushJobTest, NonEmpty) { @@ -113,6 +114,7 @@ TEST(FlushJobTest, NonEmpty) { ASSERT_OK(flush_job.Run()); mutex_.Unlock(); mock_table_factory_->AssertSingleFile(inserted_keys); + job_context.Clean(); } } // namespace rocksdb