From e25ff039c868f46aea8ba69745b5abaf22b2639c Mon Sep 17 00:00:00 2001 From: Venkatesh Radhakrishnan Date: Fri, 13 Mar 2015 14:51:40 -0700 Subject: [PATCH] Prevent slowdowns and stalls in PreShutdown tests Summary: The preshutdown tests check for stopped compactions/flushes. Removing stalls on the write path. Test Plan: DBTests.PreShutdown* Reviewers: yhchiang, sdong, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D35037 --- db/db_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/db_test.cc b/db/db_test.cc index aa419c454..8e437157f 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -10283,6 +10283,8 @@ TEST(DBTest, PreShutdownMultipleCompaction) { options.level0_file_num_compaction_trigger = kNumL0Files; options.max_bytes_for_level_multiplier = 2; options.max_background_compactions = kLowPriCount; + options.level0_stop_writes_trigger = 1 << 10; + options.level0_slowdown_writes_trigger = 1 << 10; TryReopen(options); Random rnd(301); @@ -10371,6 +10373,8 @@ TEST(DBTest, PreShutdownCompactionMiddle) { options.level0_file_num_compaction_trigger = kNumL0Files; options.max_bytes_for_level_multiplier = 2; options.max_background_compactions = kLowPriCount; + options.level0_stop_writes_trigger = 1 << 10; + options.level0_slowdown_writes_trigger = 1 << 10; TryReopen(options); Random rnd(301);