From eb8c9918f7ec6424d1a805545ccee2d650e1b9cf Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Wed, 24 Oct 2018 15:49:17 -0700 Subject: [PATCH] Remove unused variable Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/4585 Differential Revision: D10841983 Pulled By: riversand963 fbshipit-source-id: 6a7e0b40065bcfbb10a2cac0cec1e8da0750a617 --- db/db_impl.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index def0cd9ab2..9c2975589a 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -699,7 +699,6 @@ Status DBImpl::SetOptions( MutableCFOptions new_options; Status s; Status persist_options_status; - WriteThread::Writer w; SuperVersionContext sv_context(/* create_superversion */ true); { InstrumentedMutexLock l(&mutex_); @@ -761,7 +760,6 @@ Status DBImpl::SetDBOptions( Status s; Status persist_options_status; bool wal_changed = false; - WriteThread::Writer w; WriteContext write_context; { InstrumentedMutexLock l(&mutex_); @@ -810,6 +808,7 @@ Status DBImpl::SetDBOptions( env_options_for_compaction_, immutable_db_options_); env_options_for_compaction_.compaction_readahead_size = mutable_db_options_.compaction_readahead_size; + WriteThread::Writer w; write_thread_.EnterUnbatched(&w, &mutex_); if (total_log_size_ > GetMaxTotalWalSize() || wal_changed) { Status purge_wal_status = SwitchWAL(&write_context);