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
main
Maysam Yabandeh 7 years ago committed by Facebook Github Bot
parent 4d40b10e0f
commit 171f415b30
  1. 8
      db/internal_stats.cc
  2. 10
      db/version_set.cc

@ -230,8 +230,8 @@ static const std::string num_live_versions = "num-live-versions";
static const std::string current_version_number = static const std::string current_version_number =
"current-super-version-number"; "current-super-version-number";
static const std::string estimate_live_data_size = "estimate-live-data-size"; 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 min_log_number_to_keep_str = "min-log-number-to-keep";
static const std::string base_level = "base-level"; 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 total_sst_files_size = "total-sst-files-size";
static const std::string live_sst_files_size = "live-sst-files-size"; static const std::string live_sst_files_size = "live-sst-files-size";
static const std::string estimate_pending_comp_bytes = static const std::string estimate_pending_comp_bytes =
@ -308,12 +308,12 @@ const std::string DB::Properties::kCurrentSuperVersionNumber =
const std::string DB::Properties::kEstimateLiveDataSize = const std::string DB::Properties::kEstimateLiveDataSize =
rocksdb_prefix + estimate_live_data_size; rocksdb_prefix + estimate_live_data_size;
const std::string DB::Properties::kMinLogNumberToKeep = 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 = const std::string DB::Properties::kTotalSstFilesSize =
rocksdb_prefix + total_sst_files_size; rocksdb_prefix + total_sst_files_size;
const std::string DB::Properties::kLiveSstFilesSize = const std::string DB::Properties::kLiveSstFilesSize =
rocksdb_prefix + live_sst_files_size; 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 = const std::string DB::Properties::kEstimatePendingCompactionBytes =
rocksdb_prefix + estimate_pending_comp_bytes; rocksdb_prefix + estimate_pending_comp_bytes;
const std::string DB::Properties::kAggregatedTableProperties = const std::string DB::Properties::kAggregatedTableProperties =

@ -2957,24 +2957,24 @@ Status VersionSet::LogAndApply(ColumnFamilyData* column_family_data,
} }
} else { } else {
uint64_t max_log_number_in_batch = 0; 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) { for (auto& e : batch_edits) {
if (e->has_log_number_) { if (e->has_log_number_) {
max_log_number_in_batch = max_log_number_in_batch =
std::max(max_log_number_in_batch, e->log_number_); std::max(max_log_number_in_batch, e->log_number_);
} }
if (e->has_min_log_number_to_keep_) { if (e->has_min_log_number_to_keep_) {
min_log_number_to_keep = last_min_log_number_to_keep =
std::max(min_log_number_to_keep, e->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) { if (max_log_number_in_batch != 0) {
assert(column_family_data->GetLogNumber() <= max_log_number_in_batch); assert(column_family_data->GetLogNumber() <= max_log_number_in_batch);
column_family_data->SetLogNumber(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. // 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); AppendVersion(column_family_data, v);

Loading…
Cancel
Save