From 98c37fda5d049cac6111d54e02fc846b839178ea Mon Sep 17 00:00:00 2001 From: Venkatesh Radhakrishnan Date: Mon, 16 Mar 2015 21:07:54 -0700 Subject: [PATCH] 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 --- db/db_impl.cc | 4 ++-- db/db_impl.h | 2 +- hdfs/env_hdfs.h | 6 +++--- utilities/convenience/convenience.cc | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 06f3bb074..eabdfcd15 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -256,7 +256,7 @@ DBImpl::DBImpl(const DBOptions& options, const std::string& dbname) LogFlush(db_options_.info_log); } -void DBImpl::CancelAllBackgroundWork(bool wait) { +void DBImpl::CancelAllBackgroundWork() { shutting_down_.store(true, std::memory_order_release); } @@ -276,7 +276,7 @@ DBImpl::~DBImpl() { } versions_->GetColumnFamilySet()->FreeDeadColumnFamilies(); } - CancelAllBackgroundWork(true); + CancelAllBackgroundWork(); mutex_.Unlock(); int compactions_unscheduled = env_->UnSchedule(this, Env::Priority::LOW); int flushes_unscheduled = env_->UnSchedule(this, Env::Priority::HIGH); diff --git a/db/db_impl.h b/db/db_impl.h index b5d529bdf..3099d1da9 100644 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -267,7 +267,7 @@ class DBImpl : public DB { const SnapshotList& snapshots() const { return snapshots_; } - void CancelAllBackgroundWork(bool wait = false); + void CancelAllBackgroundWork(); protected: Env* const env_; diff --git a/hdfs/env_hdfs.h b/hdfs/env_hdfs.h index 3c03543a6..cc94d52af 100644 --- a/hdfs/env_hdfs.h +++ b/hdfs/env_hdfs.h @@ -107,8 +107,8 @@ class HdfsEnv : public Env { posixEnv->Schedule(function, arg, pri, tag); } - virtual int UnSchedule(void* arg, Priority pri) { - posixEnv->UnSchedule(arg, pri); + virtual int UnSchedule(void* tag, Priority pri) { + posixEnv->UnSchedule(tag, pri); } 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, 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 {} diff --git a/utilities/convenience/convenience.cc b/utilities/convenience/convenience.cc index 55303f06b..fc60b0e3a 100644 --- a/utilities/convenience/convenience.cc +++ b/utilities/convenience/convenience.cc @@ -16,7 +16,7 @@ namespace rocksdb { void CancelAllBackgroundWork(DB* db) { - (dynamic_cast(db))->CancelAllBackgroundWork(false); + (dynamic_cast(db))->CancelAllBackgroundWork(); } } // namespace rocksdb