Clean job_context
This commit is contained in:
parent
0ce38fe983
commit
23295b74b6
@ -69,6 +69,7 @@ Status DBImpl::EnableFileDeletions(bool force) {
|
|||||||
if (should_purge_files) {
|
if (should_purge_files) {
|
||||||
PurgeObsoleteFiles(job_context);
|
PurgeObsoleteFiles(job_context);
|
||||||
}
|
}
|
||||||
|
job_context.Clean();
|
||||||
LogFlush(db_options_.info_log);
|
LogFlush(db_options_.info_log);
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,7 @@ TEST(FlushJobTest, Empty) {
|
|||||||
SequenceNumber(), &job_context, nullptr, nullptr,
|
SequenceNumber(), &job_context, nullptr, nullptr,
|
||||||
kNoCompression, nullptr);
|
kNoCompression, nullptr);
|
||||||
ASSERT_OK(flush_job.Run());
|
ASSERT_OK(flush_job.Run());
|
||||||
|
job_context.Clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FlushJobTest, NonEmpty) {
|
TEST(FlushJobTest, NonEmpty) {
|
||||||
@ -113,6 +114,7 @@ TEST(FlushJobTest, NonEmpty) {
|
|||||||
ASSERT_OK(flush_job.Run());
|
ASSERT_OK(flush_job.Run());
|
||||||
mutex_.Unlock();
|
mutex_.Unlock();
|
||||||
mock_table_factory_->AssertSingleFile(inserted_keys);
|
mock_table_factory_->AssertSingleFile(inserted_keys);
|
||||||
|
job_context.Clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
Loading…
Reference in New Issue
Block a user