From 3d8bb2c8902354339c5b41a2eb14d4a8b9d19ce2 Mon Sep 17 00:00:00 2001 From: Venkatesh Radhakrishnan Date: Tue, 8 Dec 2015 11:45:29 -0800 Subject: [PATCH] Fix valgrind failure in IncreaseUniversalCompactionNumLevels Summary: Fixing a valgrind failure in DBTestUniversalCompaction in the IncreaseUniversalCompactionNumLevels test. Using SpecialSkipList with 10 rows per file. Test Plan: Run valgrind and functional tests. Reviewers: anthony, yhchiang, kradhakrishnan, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D51705 --- db/db_universal_compaction_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_universal_compaction_test.cc b/db/db_universal_compaction_test.cc index a2cae5967d..15f871b145 100644 --- a/db/db_universal_compaction_test.cc +++ b/db/db_universal_compaction_test.cc @@ -1010,13 +1010,15 @@ TEST_P(DBTestUniversalCompaction, IncreaseUniversalCompactionNumLevels) { int max_key1 = 200; int max_key2 = 600; int max_key3 = 800; + const int KNumKeysPerFile = 10; // Stage 1: open a DB with universal compaction, num_levels=1 Options options = CurrentOptions(); options.compaction_style = kCompactionStyleUniversal; options.num_levels = 1; - options.write_buffer_size = 100 << 10; // 100KB + options.write_buffer_size = 200 << 10; // 200KB options.level0_file_num_compaction_trigger = 3; + options.memtable_factory.reset(new SpecialSkipListFactory(KNumKeysPerFile)); options = CurrentOptions(options); CreateAndReopenWithCF({"pikachu"}, options);