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:
parent
9fd6edf81c
commit
98c37fda5d
@ -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);
|
||||
|
@ -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_;
|
||||
|
@ -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 {}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
namespace rocksdb {
|
||||
|
||||
void CancelAllBackgroundWork(DB* db) {
|
||||
(dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork(false);
|
||||
(dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork();
|
||||
}
|
||||
} // namespace rocksdb
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user