Increase Trash/DB size ratio in DBSSTTest.RateLimitedWALDelete (#5366)

Summary:
By increasing the ratio, we ensure that all files go through background deletion and eliminate flakiness due to timing of deletions.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5366

Differential Revision: D15549992

Pulled By: anand1976

fbshipit-source-id: d137375cd791fc1a802841412755d6e2b8fd7688
main
anand76 6 years ago committed by Facebook Github Bot
parent 87fe4bcab8
commit a984040f0b
  1. 3
      db/db_sst_test.cc

@ -430,6 +430,7 @@ TEST_F(DBSSTTest, RateLimitedWALDelete) {
env_->time_elapse_only_sleep_ = true; env_->time_elapse_only_sleep_ = true;
Options options = CurrentOptions(); Options options = CurrentOptions();
options.disable_auto_compactions = true; options.disable_auto_compactions = true;
options.compression = kNoCompression;
options.env = env_; options.env = env_;
int64_t rate_bytes_per_sec = 1024 * 10; // 10 Kbs / Sec int64_t rate_bytes_per_sec = 1024 * 10; // 10 Kbs / Sec
@ -439,7 +440,7 @@ TEST_F(DBSSTTest, RateLimitedWALDelete) {
ASSERT_OK(s); ASSERT_OK(s);
options.sst_file_manager->SetDeleteRateBytesPerSecond(rate_bytes_per_sec); options.sst_file_manager->SetDeleteRateBytesPerSecond(rate_bytes_per_sec);
auto sfm = static_cast<SstFileManagerImpl*>(options.sst_file_manager.get()); auto sfm = static_cast<SstFileManagerImpl*>(options.sst_file_manager.get());
sfm->delete_scheduler()->SetMaxTrashDBRatio(2.1); sfm->delete_scheduler()->SetMaxTrashDBRatio(3.1);
ASSERT_OK(TryReopen(options)); ASSERT_OK(TryReopen(options));
rocksdb::SyncPoint::GetInstance()->EnableProcessing(); rocksdb::SyncPoint::GetInstance()->EnableProcessing();

Loading…
Cancel
Save