From 171f415b306c65d515d13272e134a7a7647d0e7a Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Fri, 4 May 2018 15:14:20 -0700 Subject: [PATCH] Rename vars to satisfy unity built Summary: Tested by "make unity_test" Closes https://github.com/facebook/rocksdb/pull/3807 Differential Revision: D7882657 Pulled By: maysamyabandeh fbshipit-source-id: 84862c18d7f2fc762bd96ad070eaeb6936e45159 --- db/internal_stats.cc | 8 ++++---- db/version_set.cc | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 1d2adf585..b617b0d42 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -230,8 +230,8 @@ static const std::string num_live_versions = "num-live-versions"; static const std::string current_version_number = "current-super-version-number"; static const std::string estimate_live_data_size = "estimate-live-data-size"; -static const std::string min_log_number_to_keep = "min-log-number-to-keep"; -static const std::string base_level = "base-level"; +static const std::string min_log_number_to_keep_str = "min-log-number-to-keep"; +static const std::string base_level_str = "base-level"; static const std::string total_sst_files_size = "total-sst-files-size"; static const std::string live_sst_files_size = "live-sst-files-size"; static const std::string estimate_pending_comp_bytes = @@ -308,12 +308,12 @@ const std::string DB::Properties::kCurrentSuperVersionNumber = const std::string DB::Properties::kEstimateLiveDataSize = rocksdb_prefix + estimate_live_data_size; const std::string DB::Properties::kMinLogNumberToKeep = - rocksdb_prefix + min_log_number_to_keep; + rocksdb_prefix + min_log_number_to_keep_str; const std::string DB::Properties::kTotalSstFilesSize = rocksdb_prefix + total_sst_files_size; const std::string DB::Properties::kLiveSstFilesSize = rocksdb_prefix + live_sst_files_size; -const std::string DB::Properties::kBaseLevel = rocksdb_prefix + base_level; +const std::string DB::Properties::kBaseLevel = rocksdb_prefix + base_level_str; const std::string DB::Properties::kEstimatePendingCompactionBytes = rocksdb_prefix + estimate_pending_comp_bytes; const std::string DB::Properties::kAggregatedTableProperties = diff --git a/db/version_set.cc b/db/version_set.cc index 3a753604a..7cceb5860 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -2957,24 +2957,24 @@ Status VersionSet::LogAndApply(ColumnFamilyData* column_family_data, } } else { uint64_t max_log_number_in_batch = 0; - uint64_t min_log_number_to_keep = 0; + uint64_t last_min_log_number_to_keep = 0; for (auto& e : batch_edits) { if (e->has_log_number_) { max_log_number_in_batch = std::max(max_log_number_in_batch, e->log_number_); } if (e->has_min_log_number_to_keep_) { - min_log_number_to_keep = - std::max(min_log_number_to_keep, e->min_log_number_to_keep_); + last_min_log_number_to_keep = + std::max(last_min_log_number_to_keep, e->min_log_number_to_keep_); } } if (max_log_number_in_batch != 0) { assert(column_family_data->GetLogNumber() <= max_log_number_in_batch); column_family_data->SetLogNumber(max_log_number_in_batch); } - if (min_log_number_to_keep != 0) { + if (last_min_log_number_to_keep != 0) { // Should only be set in 2PC mode. - MarkMinLogNumberToKeep2PC(min_log_number_to_keep); + MarkMinLogNumberToKeep2PC(last_min_log_number_to_keep); } AppendVersion(column_family_data, v);