From 3a6d9436e82790e149f69d9a5eace3dd3f145e52 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Mon, 9 Dec 2019 09:22:07 -0800 Subject: [PATCH] Use SpecialSkipListFactory in RecalculateScoreAfterPicking (#6125) Summary: Test DBTestUniversalCompaction.RecalculateScoreAfterPicking was flaky on ARM, so it now uses SpecialSkipListFactory (like other tests) for predictable memtable flushes. Fixes https://github.com/facebook/rocksdb/issues/5736 Pull Request resolved: https://github.com/facebook/rocksdb/pull/6125 Test Plan: while ./db_universal_compaction_test; do :; done # for a while on ARM and on Intel (both Linux) Differential Revision: D18864821 Pulled By: pdillinger fbshipit-source-id: 2f3ca0ea66ce420dcd6d41b0ec12377112a5a79f --- db/db_universal_compaction_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/db_universal_compaction_test.cc b/db/db_universal_compaction_test.cc index 522f4a2d8..9d8b71047 100644 --- a/db/db_universal_compaction_test.cc +++ b/db/db_universal_compaction_test.cc @@ -1753,13 +1753,14 @@ TEST_P(DBTestUniversalCompaction, RecalculateScoreAfterPicking) { // scheduling more; otherwise, other CFs/DBs may be delayed unnecessarily. const int kNumFilesTrigger = 8; Options options = CurrentOptions(); + options.memtable_factory.reset( + new SpecialSkipListFactory(KNumKeysByGenerateNewFile - 1)); options.compaction_options_universal.max_merge_width = kNumFilesTrigger / 2; options.compaction_options_universal.max_size_amplification_percent = static_cast(-1); options.compaction_style = kCompactionStyleUniversal; options.level0_file_num_compaction_trigger = kNumFilesTrigger; options.num_levels = num_levels_; - options.write_buffer_size = 100 << 10; // 100KB Reopen(options); std::atomic num_compactions_attempted(0);