|
|
@ -37,9 +37,10 @@ class DBOptionsTest : public DBTestBase { |
|
|
|
ConfigOptions config_options; |
|
|
|
ConfigOptions config_options; |
|
|
|
config_options.delimiter = "; "; |
|
|
|
config_options.delimiter = "; "; |
|
|
|
|
|
|
|
|
|
|
|
GetStringFromMutableDBOptions(config_options, MutableDBOptions(options), |
|
|
|
EXPECT_OK(GetStringFromMutableDBOptions( |
|
|
|
&options_str); |
|
|
|
config_options, MutableDBOptions(options), &options_str)); |
|
|
|
StringToMap(options_str, &mutable_map); |
|
|
|
EXPECT_OK(StringToMap(options_str, &mutable_map)); |
|
|
|
|
|
|
|
|
|
|
|
return mutable_map; |
|
|
|
return mutable_map; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -50,9 +51,9 @@ class DBOptionsTest : public DBTestBase { |
|
|
|
config_options.delimiter = "; "; |
|
|
|
config_options.delimiter = "; "; |
|
|
|
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> mutable_map; |
|
|
|
std::unordered_map<std::string, std::string> mutable_map; |
|
|
|
GetStringFromMutableCFOptions(config_options, MutableCFOptions(options), |
|
|
|
EXPECT_OK(GetStringFromMutableCFOptions( |
|
|
|
&options_str); |
|
|
|
config_options, MutableCFOptions(options), &options_str)); |
|
|
|
StringToMap(options_str, &mutable_map); |
|
|
|
EXPECT_OK(StringToMap(options_str, &mutable_map)); |
|
|
|
return mutable_map; |
|
|
|
return mutable_map; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -134,7 +135,7 @@ TEST_F(DBOptionsTest, SetBytesPerSync) { |
|
|
|
WriteOptions write_opts; |
|
|
|
WriteOptions write_opts; |
|
|
|
// should sync approximately 40MB/1MB ~= 40 times.
|
|
|
|
// should sync approximately 40MB/1MB ~= 40 times.
|
|
|
|
for (i = 0; i < 40; i++) { |
|
|
|
for (i = 0; i < 40; i++) { |
|
|
|
Put(Key(i), kValue, write_opts); |
|
|
|
ASSERT_OK(Put(Key(i), kValue, write_opts)); |
|
|
|
} |
|
|
|
} |
|
|
|
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing(); |
|
|
|
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing(); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
@ -150,7 +151,7 @@ TEST_F(DBOptionsTest, SetBytesPerSync) { |
|
|
|
// should sync approximately 40MB*2/8MB ~= 10 times.
|
|
|
|
// should sync approximately 40MB*2/8MB ~= 10 times.
|
|
|
|
// data will be 40*2MB because of previous Puts too.
|
|
|
|
// data will be 40*2MB because of previous Puts too.
|
|
|
|
for (i = 0; i < 40; i++) { |
|
|
|
for (i = 0; i < 40; i++) { |
|
|
|
Put(Key(i), kValue, write_opts); |
|
|
|
ASSERT_OK(Put(Key(i), kValue, write_opts)); |
|
|
|
} |
|
|
|
} |
|
|
|
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing(); |
|
|
|
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing(); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
@ -181,7 +182,7 @@ TEST_F(DBOptionsTest, SetWalBytesPerSync) { |
|
|
|
const std::string kValue(kValueSize, 'v'); |
|
|
|
const std::string kValue(kValueSize, 'v'); |
|
|
|
int i = 0; |
|
|
|
int i = 0; |
|
|
|
for (; i < 10; i++) { |
|
|
|
for (; i < 10; i++) { |
|
|
|
Put(Key(i), kValue); |
|
|
|
ASSERT_OK(Put(Key(i), kValue)); |
|
|
|
} |
|
|
|
} |
|
|
|
// Do not flush. If we flush here, SwitchWAL will reuse old WAL file since its
|
|
|
|
// Do not flush. If we flush here, SwitchWAL will reuse old WAL file since its
|
|
|
|
// empty and will not get the new wal_bytes_per_sync value.
|
|
|
|
// empty and will not get the new wal_bytes_per_sync value.
|
|
|
@ -192,7 +193,7 @@ TEST_F(DBOptionsTest, SetWalBytesPerSync) { |
|
|
|
counter = 0; |
|
|
|
counter = 0; |
|
|
|
i = 0; |
|
|
|
i = 0; |
|
|
|
for (; i < 10; i++) { |
|
|
|
for (; i < 10; i++) { |
|
|
|
Put(Key(i), kValue); |
|
|
|
ASSERT_OK(Put(Key(i), kValue)); |
|
|
|
} |
|
|
|
} |
|
|
|
ASSERT_GT(counter, 0); |
|
|
|
ASSERT_GT(counter, 0); |
|
|
|
ASSERT_GT(low_bytes_per_sync, 0); |
|
|
|
ASSERT_GT(low_bytes_per_sync, 0); |
|
|
@ -227,9 +228,9 @@ TEST_F(DBOptionsTest, WritableFileMaxBufferSize) { |
|
|
|
for (; i < 3; i++) { |
|
|
|
for (; i < 3; i++) { |
|
|
|
ASSERT_OK(Put("foo", ToString(i))); |
|
|
|
ASSERT_OK(Put("foo", ToString(i))); |
|
|
|
ASSERT_OK(Put("bar", ToString(i))); |
|
|
|
ASSERT_OK(Put("bar", ToString(i))); |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
} |
|
|
|
} |
|
|
|
dbfull()->TEST_WaitForCompact(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(unmatch_cnt, 0); |
|
|
|
ASSERT_EQ(unmatch_cnt, 0); |
|
|
|
ASSERT_GE(match_cnt, 11); |
|
|
|
ASSERT_GE(match_cnt, 11); |
|
|
|
|
|
|
|
|
|
|
@ -245,9 +246,9 @@ TEST_F(DBOptionsTest, WritableFileMaxBufferSize) { |
|
|
|
for (; i < 3; i++) { |
|
|
|
for (; i < 3; i++) { |
|
|
|
ASSERT_OK(Put("foo", ToString(i))); |
|
|
|
ASSERT_OK(Put("foo", ToString(i))); |
|
|
|
ASSERT_OK(Put("bar", ToString(i))); |
|
|
|
ASSERT_OK(Put("bar", ToString(i))); |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
} |
|
|
|
} |
|
|
|
dbfull()->TEST_WaitForCompact(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(unmatch_cnt, 0); |
|
|
|
ASSERT_EQ(unmatch_cnt, 0); |
|
|
|
ASSERT_GE(match_cnt, 11); |
|
|
|
ASSERT_GE(match_cnt, 11); |
|
|
|
} |
|
|
|
} |
|
|
@ -283,14 +284,14 @@ TEST_F(DBOptionsTest, EnableAutoCompactionAndTriggerStall) { |
|
|
|
DestroyAndReopen(options); |
|
|
|
DestroyAndReopen(options); |
|
|
|
int i = 0; |
|
|
|
int i = 0; |
|
|
|
for (; i < 1024; i++) { |
|
|
|
for (; i < 1024; i++) { |
|
|
|
Put(Key(i), kValue); |
|
|
|
ASSERT_OK(Put(Key(i), kValue)); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
for (; i < 1024 * 2; i++) { |
|
|
|
for (; i < 1024 * 2; i++) { |
|
|
|
Put(Key(i), kValue); |
|
|
|
ASSERT_OK(Put(Key(i), kValue)); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
dbfull()->TEST_WaitForFlushMemTable(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable()); |
|
|
|
ASSERT_EQ(2, NumTableFilesAtLevel(0)); |
|
|
|
ASSERT_EQ(2, NumTableFilesAtLevel(0)); |
|
|
|
uint64_t l0_size = SizeAtLevel(0); |
|
|
|
uint64_t l0_size = SizeAtLevel(0); |
|
|
|
|
|
|
|
|
|
|
@ -312,7 +313,7 @@ TEST_F(DBOptionsTest, EnableAutoCompactionAndTriggerStall) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
Reopen(options); |
|
|
|
Reopen(options); |
|
|
|
dbfull()->TEST_WaitForCompact(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().IsStopped()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().IsStopped()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().NeedsDelay()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().NeedsDelay()); |
|
|
|
|
|
|
|
|
|
|
@ -359,7 +360,7 @@ TEST_F(DBOptionsTest, EnableAutoCompactionAndTriggerStall) { |
|
|
|
TEST_SYNC_POINT("DBOptionsTest::EnableAutoCompactionAndTriggerStall:3"); |
|
|
|
TEST_SYNC_POINT("DBOptionsTest::EnableAutoCompactionAndTriggerStall:3"); |
|
|
|
|
|
|
|
|
|
|
|
// Background compaction executed.
|
|
|
|
// Background compaction executed.
|
|
|
|
dbfull()->TEST_WaitForCompact(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().IsStopped()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().IsStopped()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().NeedsDelay()); |
|
|
|
ASSERT_FALSE(dbfull()->TEST_write_controler().NeedsDelay()); |
|
|
|
} |
|
|
|
} |
|
|
@ -376,12 +377,12 @@ TEST_F(DBOptionsTest, SetOptionsMayTriggerCompaction) { |
|
|
|
// Need to insert two keys to avoid trivial move.
|
|
|
|
// Need to insert two keys to avoid trivial move.
|
|
|
|
ASSERT_OK(Put("foo", ToString(i))); |
|
|
|
ASSERT_OK(Put("foo", ToString(i))); |
|
|
|
ASSERT_OK(Put("bar", ToString(i))); |
|
|
|
ASSERT_OK(Put("bar", ToString(i))); |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
} |
|
|
|
} |
|
|
|
ASSERT_EQ("3", FilesPerLevel()); |
|
|
|
ASSERT_EQ("3", FilesPerLevel()); |
|
|
|
ASSERT_OK( |
|
|
|
ASSERT_OK( |
|
|
|
dbfull()->SetOptions({{"level0_file_num_compaction_trigger", "3"}})); |
|
|
|
dbfull()->SetOptions({{"level0_file_num_compaction_trigger", "3"}})); |
|
|
|
dbfull()->TEST_WaitForCompact(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ("0,1", FilesPerLevel()); |
|
|
|
ASSERT_EQ("0,1", FilesPerLevel()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -503,7 +504,7 @@ TEST_F(DBOptionsTest, MaxTotalWalSizeChange) { |
|
|
|
ASSERT_OK(dbfull()->SetDBOptions({{"max_total_wal_size", "10"}})); |
|
|
|
ASSERT_OK(dbfull()->SetDBOptions({{"max_total_wal_size", "10"}})); |
|
|
|
|
|
|
|
|
|
|
|
for (size_t cf = 0; cf < handles_.size(); ++cf) { |
|
|
|
for (size_t cf = 0; cf < handles_.size(); ++cf) { |
|
|
|
dbfull()->TEST_WaitForFlushMemTable(handles_[cf]); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable(handles_[cf])); |
|
|
|
ASSERT_EQ("1", FilesPerLevel(static_cast<int>(cf))); |
|
|
|
ASSERT_EQ("1", FilesPerLevel(static_cast<int>(cf))); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -716,13 +717,13 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
|
|
|
|
|
|
|
|
// No files should be compacted as ttl is set to 1 hour.
|
|
|
|
// No files should be compacted as ttl is set to 1 hour.
|
|
|
|
ASSERT_EQ(dbfull()->GetOptions().ttl, 3600); |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().ttl, 3600); |
|
|
|
dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
|
|
|
|
|
|
|
|
// Set ttl to 1 minute. So all files should get deleted.
|
|
|
|
// Set ttl to 1 minute. So all files should get deleted.
|
|
|
|
ASSERT_OK(dbfull()->SetOptions({{"ttl", "60"}})); |
|
|
|
ASSERT_OK(dbfull()->SetOptions({{"ttl", "60"}})); |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().ttl, 60); |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().ttl, 60); |
|
|
|
dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 0); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 0); |
|
|
|
|
|
|
|
|
|
|
@ -738,7 +739,7 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
ASSERT_OK(Put(ToString(i * 20 + j), rnd.RandomString(980))); |
|
|
|
ASSERT_OK(Put(ToString(i * 20 + j), rnd.RandomString(980))); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
} |
|
|
|
} |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
@ -746,7 +747,7 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
// No files should be compacted as max_table_files_size is set to 500 KB.
|
|
|
|
// No files should be compacted as max_table_files_size is set to 500 KB.
|
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.max_table_files_size, |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.max_table_files_size, |
|
|
|
500 << 10); |
|
|
|
500 << 10); |
|
|
|
dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
|
|
|
|
|
|
|
|
// Set max_table_files_size to 12 KB. So only 1 file should remain now.
|
|
|
|
// Set max_table_files_size to 12 KB. So only 1 file should remain now.
|
|
|
@ -754,7 +755,7 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
{{"compaction_options_fifo", "{max_table_files_size=12288;}"}})); |
|
|
|
{{"compaction_options_fifo", "{max_table_files_size=12288;}"}})); |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.max_table_files_size, |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.max_table_files_size, |
|
|
|
12 << 10); |
|
|
|
12 << 10); |
|
|
|
dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 1); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 1); |
|
|
|
|
|
|
|
|
|
|
@ -770,7 +771,7 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
ASSERT_OK(Put(ToString(i * 20 + j), rnd.RandomString(980))); |
|
|
|
ASSERT_OK(Put(ToString(i * 20 + j), rnd.RandomString(980))); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
} |
|
|
|
} |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
@ -779,7 +780,7 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
// allow_compaction is false
|
|
|
|
// allow_compaction is false
|
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.allow_compaction, |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.allow_compaction, |
|
|
|
false); |
|
|
|
false); |
|
|
|
dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
|
|
|
|
|
|
|
|
// Set allow_compaction to true. So number of files should be between 1 and 5.
|
|
|
|
// Set allow_compaction to true. So number of files should be between 1 and 5.
|
|
|
@ -787,7 +788,7 @@ TEST_F(DBOptionsTest, SetFIFOCompactionOptions) { |
|
|
|
{{"compaction_options_fifo", "{allow_compaction=true;}"}})); |
|
|
|
{{"compaction_options_fifo", "{allow_compaction=true;}"}})); |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.allow_compaction, |
|
|
|
ASSERT_EQ(dbfull()->GetOptions().compaction_options_fifo.allow_compaction, |
|
|
|
true); |
|
|
|
true); |
|
|
|
dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr); |
|
|
|
ASSERT_OK(dbfull()->CompactRange(CompactRangeOptions(), nullptr, nullptr)); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_GE(NumTableFilesAtLevel(0), 1); |
|
|
|
ASSERT_GE(NumTableFilesAtLevel(0), 1); |
|
|
|
ASSERT_LE(NumTableFilesAtLevel(0), 5); |
|
|
|
ASSERT_LE(NumTableFilesAtLevel(0), 5); |
|
|
@ -808,14 +809,14 @@ TEST_F(DBOptionsTest, CompactionReadaheadSizeChange) { |
|
|
|
ASSERT_OK(dbfull()->SetDBOptions({{"compaction_readahead_size", "256"}})); |
|
|
|
ASSERT_OK(dbfull()->SetDBOptions({{"compaction_readahead_size", "256"}})); |
|
|
|
ASSERT_EQ(256, dbfull()->GetDBOptions().compaction_readahead_size); |
|
|
|
ASSERT_EQ(256, dbfull()->GetDBOptions().compaction_readahead_size); |
|
|
|
for (int i = 0; i < 1024; i++) { |
|
|
|
for (int i = 0; i < 1024; i++) { |
|
|
|
Put(Key(i), kValue); |
|
|
|
ASSERT_OK(Put(Key(i), kValue)); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
for (int i = 0; i < 1024 * 2; i++) { |
|
|
|
for (int i = 0; i < 1024 * 2; i++) { |
|
|
|
Put(Key(i), kValue); |
|
|
|
ASSERT_OK(Put(Key(i), kValue)); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
dbfull()->TEST_WaitForCompact(); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(256, env_->compaction_readahead_size_); |
|
|
|
ASSERT_EQ(256, env_->compaction_readahead_size_); |
|
|
|
Close(); |
|
|
|
Close(); |
|
|
|
} |
|
|
|
} |
|
|
@ -834,7 +835,7 @@ TEST_F(DBOptionsTest, FIFOTtlBackwardCompatible) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
ASSERT_OK(Put(ToString(i * 20 + j), rnd.RandomString(980))); |
|
|
|
ASSERT_OK(Put(ToString(i * 20 + j), rnd.RandomString(980))); |
|
|
|
} |
|
|
|
} |
|
|
|
Flush(); |
|
|
|
ASSERT_OK(Flush()); |
|
|
|
} |
|
|
|
} |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_OK(dbfull()->TEST_WaitForCompact()); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|
ASSERT_EQ(NumTableFilesAtLevel(0), 10); |
|
|
|