mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 22:44:05 +00:00
Use manual_compaction for compaction_job_test
Summary: Under certain conditions (disable compression) the compactions that are created in compaction_job_test will pass the trivial_move conditions This will cause problems since we assert that we dont run a compaction if it's a trivial move https://github.com/facebook/rocksdb/blob/master/db/compaction_job.cc#L144-L147 for example when we disable compression, compactions become a valid trivial move and the assert fails https://ci-builds.fb.com/view/rocksdb/job/rocksdb_no_compression/180/console Test Plan: compaction_job_test Reviewers: sdong, yhchiang, noetzli, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D43983
This commit is contained in:
parent
6b2d57039a
commit
c2868cbc52
|
@ -38,7 +38,7 @@ void VerifyInitializationOfCompactionJobStats(
|
||||||
ASSERT_EQ(compaction_job_stats.num_output_records, 0U);
|
ASSERT_EQ(compaction_job_stats.num_output_records, 0U);
|
||||||
ASSERT_EQ(compaction_job_stats.num_output_files, 0U);
|
ASSERT_EQ(compaction_job_stats.num_output_files, 0U);
|
||||||
|
|
||||||
ASSERT_EQ(compaction_job_stats.is_manual_compaction, false);
|
ASSERT_EQ(compaction_job_stats.is_manual_compaction, true);
|
||||||
|
|
||||||
ASSERT_EQ(compaction_job_stats.total_input_bytes, 0U);
|
ASSERT_EQ(compaction_job_stats.total_input_bytes, 0U);
|
||||||
ASSERT_EQ(compaction_job_stats.total_output_bytes, 0U);
|
ASSERT_EQ(compaction_job_stats.total_output_bytes, 0U);
|
||||||
|
@ -240,7 +240,7 @@ class CompactionJobTest : public testing::Test {
|
||||||
Compaction compaction(cfd->current()->storage_info(),
|
Compaction compaction(cfd->current()->storage_info(),
|
||||||
*cfd->GetLatestMutableCFOptions(),
|
*cfd->GetLatestMutableCFOptions(),
|
||||||
compaction_input_files, 1, 1024 * 1024, 10, 0,
|
compaction_input_files, 1, 1024 * 1024, 10, 0,
|
||||||
kNoCompression, {});
|
kNoCompression, {}, true);
|
||||||
compaction.SetInputVersion(cfd->current());
|
compaction.SetInputVersion(cfd->current());
|
||||||
|
|
||||||
LogBuffer log_buffer(InfoLogLevel::INFO_LEVEL, db_options_.info_log.get());
|
LogBuffer log_buffer(InfoLogLevel::INFO_LEVEL, db_options_.info_log.get());
|
||||||
|
|
Loading…
Reference in a new issue