From 21ce018a3222b3a389b3f722930bafc9291aad8e Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 24 Aug 2020 11:24:22 -0700 Subject: [PATCH] Disable fsync in some ExternalSSTFileTest tests (#7303) Summary: Some ExternalSSTFileTest runs very long on some places. Disable fsync in some tests to speed them up. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7303 Test Plan: Run these tests. Reviewed By: riversand963 Differential Revision: D23280261 fbshipit-source-id: 0dca862e462f9e6d807f393320a1f82aa5b87e59 --- db/external_sst_file_test.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db/external_sst_file_test.cc b/db/external_sst_file_test.cc index 1c7ce47de..c0be14e0a 100644 --- a/db/external_sst_file_test.cc +++ b/db/external_sst_file_test.cc @@ -990,6 +990,7 @@ TEST_F(ExternalSSTFileTest, SkipSnapshot) { } TEST_F(ExternalSSTFileTest, MultiThreaded) { + env_->skip_fsync_ = true; // Bulk load 10 files every file contain 1000 keys int num_files = 10; int keys_per_file = 1000; @@ -1102,6 +1103,7 @@ TEST_F(ExternalSSTFileTest, MultiThreaded) { } TEST_F(ExternalSSTFileTest, OverlappingRanges) { + env_->skip_fsync_ = true; Random rnd(301); SequenceNumber assigned_seqno = 0; ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack( @@ -1234,6 +1236,7 @@ TEST_F(ExternalSSTFileTest, OverlappingRanges) { } TEST_P(ExternalSSTFileTest, PickedLevel) { + env_->skip_fsync_ = true; Options options = CurrentOptions(); options.disable_auto_compactions = false; options.level0_file_num_compaction_trigger = 4; @@ -1300,6 +1303,7 @@ TEST_P(ExternalSSTFileTest, PickedLevel) { } TEST_F(ExternalSSTFileTest, PickedLevelBug) { + env_->skip_fsync_ = true; Options options = CurrentOptions(); options.disable_auto_compactions = false; options.level0_file_num_compaction_trigger = 3; @@ -1420,6 +1424,7 @@ TEST_F(ExternalSSTFileTest, IngestNonExistingFile) { } TEST_F(ExternalSSTFileTest, CompactDuringAddFileRandom) { + env_->skip_fsync_ = true; Options options = CurrentOptions(); options.disable_auto_compactions = false; options.level0_file_num_compaction_trigger = 2; @@ -1477,6 +1482,7 @@ TEST_F(ExternalSSTFileTest, CompactDuringAddFileRandom) { } TEST_F(ExternalSSTFileTest, PickedLevelDynamic) { + env_->skip_fsync_ = true; Options options = CurrentOptions(); options.disable_auto_compactions = false; options.level0_file_num_compaction_trigger = 4;