Skip to content

Commit

Permalink
set const property
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanabc authored and 司靖 committed Jun 21, 2016
1 parent e5f0a51 commit 2883fcd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ void DBImpl::DeleteObsoleteFiles() {
return;
}

uint64_t log_number = versions_->LogNumber();
uint64_t prev_log_number = versions_->PrevLogNumber();
uint64_t manifest_file_number = versions_->ManifestFileNumber();
const uint64_t log_number = versions_->LogNumber();
const uint64_t prev_log_number = versions_->PrevLogNumber();
const uint64_t manifest_file_number = versions_->ManifestFileNumber();

// Make a set of all of the live files
std::set<uint64_t> live = pending_outputs_;
Expand All @@ -235,7 +235,9 @@ void DBImpl::DeleteObsoleteFiles() {
std::vector<std::string> filenames;
env_->GetChildren(dbname_, &filenames); // Ignoring errors on purpose

// Unlock while deleting obsolete files
mutex_.Unlock();

uint64_t number;
FileType type;
for (size_t i = 0; i < filenames.size(); i++) {
Expand Down

0 comments on commit 2883fcd

Please sign in to comment.