Remove unused parameter in CancelAllBackgroundWork

Summary: Some suggestions for cleanup from Igor.

Test Plan: Regression tests.

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D35169
This commit is contained in:
Venkatesh Radhakrishnan 2015-03-16 21:07:54 -07:00
parent 9fd6edf81c
commit 98c37fda5d
4 changed files with 7 additions and 7 deletions

View File

@ -256,7 +256,7 @@ DBImpl::DBImpl(const DBOptions& options, const std::string& dbname)
LogFlush(db_options_.info_log); LogFlush(db_options_.info_log);
} }
void DBImpl::CancelAllBackgroundWork(bool wait) { void DBImpl::CancelAllBackgroundWork() {
shutting_down_.store(true, std::memory_order_release); shutting_down_.store(true, std::memory_order_release);
} }
@ -276,7 +276,7 @@ DBImpl::~DBImpl() {
} }
versions_->GetColumnFamilySet()->FreeDeadColumnFamilies(); versions_->GetColumnFamilySet()->FreeDeadColumnFamilies();
} }
CancelAllBackgroundWork(true); CancelAllBackgroundWork();
mutex_.Unlock(); mutex_.Unlock();
int compactions_unscheduled = env_->UnSchedule(this, Env::Priority::LOW); int compactions_unscheduled = env_->UnSchedule(this, Env::Priority::LOW);
int flushes_unscheduled = env_->UnSchedule(this, Env::Priority::HIGH); int flushes_unscheduled = env_->UnSchedule(this, Env::Priority::HIGH);

View File

@ -267,7 +267,7 @@ class DBImpl : public DB {
const SnapshotList& snapshots() const { return snapshots_; } const SnapshotList& snapshots() const { return snapshots_; }
void CancelAllBackgroundWork(bool wait = false); void CancelAllBackgroundWork();
protected: protected:
Env* const env_; Env* const env_;

View File

@ -107,8 +107,8 @@ class HdfsEnv : public Env {
posixEnv->Schedule(function, arg, pri, tag); posixEnv->Schedule(function, arg, pri, tag);
} }
virtual int UnSchedule(void* arg, Priority pri) { virtual int UnSchedule(void* tag, Priority pri) {
posixEnv->UnSchedule(arg, pri); posixEnv->UnSchedule(tag, pri);
} }
virtual void StartThread(void (*function)(void* arg), void* arg) { virtual void StartThread(void (*function)(void* arg), void* arg) {
@ -328,7 +328,7 @@ class HdfsEnv : public Env {
virtual void Schedule(void (*function)(void* arg), void* arg, virtual void Schedule(void (*function)(void* arg), void* arg,
Priority pri = LOW, void* tag = nullptr) override {} Priority pri = LOW, void* tag = nullptr) override {}
virtual int UnSchedule(void* arg, Priority pri) override { return 0; } virtual int UnSchedule(void* tag, Priority pri) override { return 0; }
virtual void StartThread(void (*function)(void* arg), void* arg) override {} virtual void StartThread(void (*function)(void* arg), void* arg) override {}

View File

@ -16,7 +16,7 @@
namespace rocksdb { namespace rocksdb {
void CancelAllBackgroundWork(DB* db) { void CancelAllBackgroundWork(DB* db) {
(dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork(false); (dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork();
} }
} // namespace rocksdb } // namespace rocksdb