From 02b635fa3854d652ab87d3e176c005daf5037db4 Mon Sep 17 00:00:00 2001 From: sdong Date: Tue, 21 Jul 2015 17:04:00 -0700 Subject: [PATCH] Fix undeterministic failure of DBTest.GetPropertiesOfAllTablesTest Summary: DBTest.GetPropertiesOfAllTablesTest generates four files and expects four files there, but a L0->L1 comapction can trigger to compact to one single file. Fix it by raising level 0 number of file compaction trigger Test Plan: Run it many times and see it never fails. Reviewers: kradhakrishnan, IslamAbdelRahman, yhchiang, anthony Reviewed By: anthony Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D42789 --- db/db_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_test.cc b/db/db_test.cc index 855054b12..f9e160ce7 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -420,7 +420,7 @@ TEST_F(DBTest, ParanoidFileChecks) { TEST_F(DBTest, GetPropertiesOfAllTablesTest) { Options options = CurrentOptions(); - options.max_background_flushes = 0; + options.level0_file_num_compaction_trigger = 8; Reopen(options); // Create 4 tables for (int table = 0; table < 4; ++table) {