提交 c1b3cde1 编写于 作者: Y Yueh-Hsuan Chiang

Improve the robustness of ThreadStatusSingleCompaction

Summary:
Improve the robustness of ThreadStatusSingleCompaction
by ensuring the number of files flushed in the test.

Test Plan:
export ROCKSDB_TESTS=ThreadStatus
./db_test

Reviewers: sdong, igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D35019
上级 8c12426c
......@@ -10176,10 +10176,13 @@ TEST(DBTest, ThreadStatusSingleCompaction) {
DestroyAndReopen(options);
Random rnd(301);
for (int key = kEntriesPerBuffer * kNumL0Files; key >= 0; --key) {
ASSERT_OK(Put(ToString(key), RandomString(&rnd, kTestValueSize)));
for (int file = 0; file < kNumL0Files; ++file) {
for (int key = 0; key < kEntriesPerBuffer; ++key) {
ASSERT_OK(Put(ToString(key + file * kEntriesPerBuffer),
RandomString(&rnd, kTestValueSize)));
}
Flush();
}
Flush();
ASSERT_GE(NumTableFilesAtLevel(0),
options.level0_file_num_compaction_trigger);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册