From 05a86318a7d25cee04e605828c052a814fb6d92e Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Wed, 11 Dec 2019 10:26:35 -0800 Subject: [PATCH] Remove unused low_pri_write_rate_limiter_ (#6068) Summary: `low_pri_write_rate_limiter_` is not being used. Removing. `WriteController` has an internal low_pri rate limiter which is the real rate limiter for low-pri writes. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6068 Test Plan: make Differential Revision: D18664120 fbshipit-source-id: dfe3e4de033cf3522b67781b383aad7d0936034c --- db/db_impl/db_impl.cc | 7 ------- db/db_impl/db_impl.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/db/db_impl/db_impl.cc b/db/db_impl/db_impl.cc index ee73cc3fd..2504831a3 100644 --- a/db/db_impl/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -141,8 +141,6 @@ void DumpSupportInfo(Logger* logger) { ROCKS_LOG_HEADER(logger, "Fast CRC32 supported: %s", crc32c::IsFastCrc32Supported().c_str()); } - -int64_t kDefaultLowPriThrottledRate = 2 * 1024 * 1024; } // namespace DBImpl::DBImpl(const DBOptions& options, const std::string& dbname, @@ -178,11 +176,6 @@ DBImpl::DBImpl(const DBOptions& options, const std::string& dbname, write_thread_(immutable_db_options_), nonmem_write_thread_(immutable_db_options_), write_controller_(mutable_db_options_.delayed_write_rate), - // Use delayed_write_rate as a base line to determine the initial - // low pri write rate limit. It may be adjusted later. - low_pri_write_rate_limiter_(NewGenericRateLimiter(std::min( - static_cast(mutable_db_options_.delayed_write_rate / 8), - kDefaultLowPriThrottledRate))), last_batch_group_size_(0), unscheduled_flushes_(0), unscheduled_compactions_(0), diff --git a/db/db_impl/db_impl.h b/db/db_impl/db_impl.h index 67a81259d..5d3f6830a 100644 --- a/db/db_impl/db_impl.h +++ b/db/db_impl/db_impl.h @@ -1831,8 +1831,6 @@ class DBImpl : public DB { WriteController write_controller_; - std::unique_ptr low_pri_write_rate_limiter_; - // Size of the last batch group. In slowdown mode, next write needs to // sleep if it uses up the quota. // Note: This is to protect memtable and compaction. If the batch only writes