Skip to content

Commit

Permalink
Remove unused parameter in CancelAllBackgroundWork
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rven1 committed Mar 17, 2015
1 parent 9fd6edf commit 98c37fd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion db/db_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
6 changes: 3 additions & 3 deletions hdfs/env_hdfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 {}

Expand Down
2 changes: 1 addition & 1 deletion utilities/convenience/convenience.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace rocksdb {

void CancelAllBackgroundWork(DB* db) {
(dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork(false);
(dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork();
}
} // namespace rocksdb

Expand Down

0 comments on commit 98c37fd

Please sign in to comment.