From 76d63b4525a4709b42490feb5df41d0c2d20a152 Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 30 Mar 2015 15:35:18 -0700 Subject: [PATCH] Fix one non-determinism of DBTest.DynamicCompactionOptions Summary: After recent change of DBTest.DynamicCompactionOptions, occasionally hit another non-deterministic case where L0 showdown is triggered while timeout should not triggered for hard limit. Fix it by increasing L0 slowdown trigger at the same time. Test Plan: Run the failed test. Reviewers: igor, rven Reviewed By: rven Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D36219 --- db/db_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/db_test.cc b/db/db_test.cc index b8a067469..21ba736be 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -11458,7 +11458,9 @@ TEST_F(DBTest, DynamicCompactionOptions) { // we should start to see put delay (1000 us) and timeout as a result // (L0 score is not regulated by this limit). ASSERT_OK(dbfull()->SetOptions({ - {"hard_rate_limit", "2"} + {"hard_rate_limit", "2"}, + {"level0_slowdown_writes_trigger", "18"}, + {"level0_stop_writes_trigger", "20"} })); ASSERT_OK(Put(Key(count), RandomString(&rnd, 1024))); dbfull()->TEST_FlushMemTable(true); @@ -11477,7 +11479,7 @@ TEST_F(DBTest, DynamicCompactionOptions) { // Lift the limit and no timeout ASSERT_OK(dbfull()->SetOptions({ - {"hard_rate_limit", "100"} + {"hard_rate_limit", "200"}, })); dbfull()->TEST_FlushMemTable(true); sleep_count.store(0);