提交 82f148ef 编写于 作者: S sdong

Fix test DBCompactionTest.PartialCompactionFailure undeterministic failure

Summary: DBCompactionTest.PartialCompactionFailure has a risk that one flush job writes out two mem tables into one file, so that the total files flushed are less than expected. Fix it by writing for flush to finish after every write.

Test Plan: Run the test

Reviewers: IslamAbdelRahman, kradhakrishnan, yhchiang, anthony

Reviewed By: anthony

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D42831
上级 6002801e
......@@ -1278,6 +1278,7 @@ TEST_F(DBCompactionTest, PartialCompactionFailure) {
keys.emplace_back(RandomString(&rnd, kKeySize));
values.emplace_back(RandomString(&rnd, kKvSize - kKeySize));
ASSERT_OK(Put(Slice(keys[k]), Slice(values[k])));
dbfull()->TEST_WaitForFlushMemTable();
}
dbfull()->TEST_FlushMemTable(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册