Skip to content

Commit

Permalink
rename options_ to db_options_ in DBImpl to avoid confusion
Browse files Browse the repository at this point in the history
Summary: as title

Test Plan: make release

Reviewers: sdong, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D22935
  • Loading branch information
Lei Jin committed Sep 5, 2014
1 parent 5cd0576 commit c9e419c
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 179 deletions.
20 changes: 10 additions & 10 deletions db/db_filesnapshot.cc
Expand Up @@ -32,9 +32,9 @@ Status DBImpl::DisableFileDeletions() {
MutexLock l(&mutex_);
++disable_delete_obsolete_files_;
if (disable_delete_obsolete_files_ == 1) {
Log(options_.info_log, "File Deletions Disabled");
Log(db_options_.info_log, "File Deletions Disabled");
} else {
Log(options_.info_log,
Log(db_options_.info_log,
"File Deletions Disabled, but already disabled. Counter: %d",
disable_delete_obsolete_files_);
}
Expand All @@ -53,19 +53,19 @@ Status DBImpl::EnableFileDeletions(bool force) {
--disable_delete_obsolete_files_;
}
if (disable_delete_obsolete_files_ == 0) {
Log(options_.info_log, "File Deletions Enabled");
Log(db_options_.info_log, "File Deletions Enabled");
should_purge_files = true;
FindObsoleteFiles(deletion_state, true);
} else {
Log(options_.info_log,
Log(db_options_.info_log,
"File Deletions Enable, but not really enabled. Counter: %d",
disable_delete_obsolete_files_);
}
}
if (should_purge_files) {
PurgeObsoleteFiles(deletion_state);
}
LogFlush(options_.info_log);
LogFlush(db_options_.info_log);
return Status::OK();
}

Expand Down Expand Up @@ -98,7 +98,7 @@ Status DBImpl::GetLiveFiles(std::vector<std::string>& ret,

if (!status.ok()) {
mutex_.Unlock();
Log(options_.info_log, "Cannot Flush data %s\n",
Log(db_options_.info_log, "Cannot Flush data %s\n",
status.ToString().c_str());
return status;
}
Expand Down Expand Up @@ -136,7 +136,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
Status s;
// list wal files in main db dir.
VectorLogPtr logs;
s = GetSortedWalsOfType(options_.wal_dir, logs, kAliveLogFile);
s = GetSortedWalsOfType(db_options_.wal_dir, logs, kAliveLogFile);
if (!s.ok()) {
return s;
}
Expand All @@ -149,7 +149,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {

files.clear();
// list wal files in archive dir.
std::string archivedir = ArchivalDirectory(options_.wal_dir);
std::string archivedir = ArchivalDirectory(db_options_.wal_dir);
if (env_->FileExists(archivedir)) {
s = GetSortedWalsOfType(archivedir, files, kArchivedLogFile);
if (!s.ok()) {
Expand All @@ -160,7 +160,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
uint64_t latest_archived_log_number = 0;
if (!files.empty()) {
latest_archived_log_number = files.back()->LogNumber();
Log(options_.info_log, "Latest Archived log: %" PRIu64,
Log(db_options_.info_log, "Latest Archived log: %" PRIu64,
latest_archived_log_number);
}

Expand All @@ -173,7 +173,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
// same log in both db dir and archived dir. Simply
// ignore the one in db dir. Note that, if we read
// archived dir first, we would have missed the log file.
Log(options_.info_log, "%s already moved to archive",
Log(db_options_.info_log, "%s already moved to archive",
log->PathName().c_str());
}
}
Expand Down

0 comments on commit c9e419c

Please sign in to comment.