From f8b5bb2fd82a39ab4c0b27d21bd492bc61177742 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Fri, 20 Oct 2017 14:07:42 -0700 Subject: [PATCH] remove unused code Summary: fixup 6a541afcc4d1e5b6e6d78e288b9bee3bb2a933b5. This code didn't do anything because (1) `bytes_per_sync` is assigned in `EnvOptions`'s constructor; and (2) `OptimizeForCompactionTableWrite`'s return value was ignored, even though its only purpose is to return something. Closes https://github.com/facebook/rocksdb/pull/3055 Differential Revision: D6114132 Pulled By: ajkr fbshipit-source-id: ea4831770930e9cf83518e13eb2e1934d1f5487c --- db/db_impl.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index dc8597f81e8..d7de69d1442 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -574,10 +574,6 @@ Status DBImpl::SetDBOptions( env_options_for_compaction_ = env_->OptimizeForCompactionTableWrite( env_options_for_compaction_, immutable_db_options_); - env_options_for_compaction_.bytes_per_sync - = mutable_db_options_.bytes_per_sync; - env_->OptimizeForCompactionTableWrite(env_options_for_compaction_, - immutable_db_options_); write_thread_.EnterUnbatched(&w, &mutex_); if (total_log_size_ > GetMaxTotalWalSize() || wal_changed) { Status purge_wal_status = SwitchWAL(&write_context);