From f276c3a821779300a9ecb6f591cba16adb4d772b Mon Sep 17 00:00:00 2001 From: Venkatesh Radhakrishnan Date: Mon, 7 Dec 2015 11:57:00 -0800 Subject: [PATCH] Fix valgrind failures in 3 tests in db_compaction_test due to new skiplist changes Summary: Several tests in db_compaction_test are failing with aborts in valgrind. These are LevelCompactionThirdPath, LevelCompactionPathUse and CompressLevelCompaction. We now use the SpecialSkipListFactory to make them more deterministic Test Plan: valgrind Reviewers: anthony, yhchiang, kradhakrishnan, IslamAbdelRahman, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D51663 --- db/db_compaction_test.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db/db_compaction_test.cc b/db/db_compaction_test.cc index c0ad49afd..6e545c581 100644 --- a/db/db_compaction_test.cc +++ b/db/db_compaction_test.cc @@ -856,6 +856,8 @@ TEST_P(DBCompactionTestWithParam, LevelCompactionThirdPath) { options.db_paths.emplace_back(dbname_, 500 * 1024); options.db_paths.emplace_back(dbname_ + "_2", 4 * 1024 * 1024); options.db_paths.emplace_back(dbname_ + "_3", 1024 * 1024 * 1024); + options.memtable_factory.reset( + new SpecialSkipListFactory(KNumKeysByGenerateNewFile - 1)); options.compaction_style = kCompactionStyleLevel; options.write_buffer_size = 110 << 10; // 110KB options.arena_block_size = 4 << 10; @@ -971,6 +973,8 @@ TEST_P(DBCompactionTestWithParam, LevelCompactionPathUse) { options.db_paths.emplace_back(dbname_, 500 * 1024); options.db_paths.emplace_back(dbname_ + "_2", 4 * 1024 * 1024); options.db_paths.emplace_back(dbname_ + "_3", 1024 * 1024 * 1024); + options.memtable_factory.reset( + new SpecialSkipListFactory(KNumKeysByGenerateNewFile - 1)); options.compaction_style = kCompactionStyleLevel; options.write_buffer_size = 110 << 10; // 110KB options.arena_block_size = 4 << 10; @@ -1611,6 +1615,8 @@ TEST_P(DBCompactionTestWithParam, CompressLevelCompaction) { return; } Options options = CurrentOptions(); + options.memtable_factory.reset( + new SpecialSkipListFactory(KNumKeysByGenerateNewFile - 1)); options.compaction_style = kCompactionStyleLevel; options.write_buffer_size = 110 << 10; // 110KB options.arena_block_size = 4 << 10;