diff --git a/CMakeLists.txt b/CMakeLists.txt index bbaefd2222..ca7c7a0b9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,8 +59,8 @@ add_custom_command(OUTPUT ${BUILD_VERSION_CC} add_custom_target(GenerateBuildVersion DEPENDS ${BUILD_VERSION_CC}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /nologo /EHsc /GS /Gd /GR /GF /fp:precise /Zc:wchar_t /Zc:forScope /errorReport:queue") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FC /d2Zi+ /W3 /WX /wd4127 /wd4267 /wd4800 /wd4996") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FC /d2Zi+ /W3 /WX /wd4127 /wd4800 /wd4996") # Used to run CI build and tests so we can run faster set(OPTIMIZE_DEBUG_DEFAULT 0) # Debug build is unoptimized by default use -DOPTDBG=1 to optimize diff --git a/db/compaction_job_stats_test.cc b/db/compaction_job_stats_test.cc index 14a7b9b4b9..2685f6e458 100644 --- a/db/compaction_job_stats_test.cc +++ b/db/compaction_job_stats_test.cc @@ -551,8 +551,9 @@ uint64_t EstimatedFileSize( const size_t kFooterSize = 512; uint64_t data_size = - static_cast(num_records * (key_size + - value_size * compression_ratio + kPerKeyOverhead)); + static_cast( + num_records * (key_size + value_size * compression_ratio + + kPerKeyOverhead)); return data_size + kFooterSize + num_records * bloom_bits_per_key / 8 // filter block diff --git a/db/version_set.cc b/db/version_set.cc index 87d5255819..40adcda5fe 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -738,22 +738,22 @@ uint64_t VersionStorageInfo::GetEstimatedActiveKeys() const { // (2) keys are directly overwritten // (3) deletion on non-existing keys // (4) low number of samples - if (num_samples_ == 0) { + if (current_num_samples_ == 0) { return 0; } - if (accumulated_num_non_deletions_ <= accumulated_num_deletions_) { + if (current_num_non_deletions_ <= current_num_deletions_) { return 0; } - uint64_t est = accumulated_num_non_deletions_ - accumulated_num_deletions_; + uint64_t est = current_num_non_deletions_ - current_num_deletions_; uint64_t file_count = 0; for (int level = 0; level < num_levels_; ++level) { file_count += files_[level].size(); } - if (num_samples_ < file_count) { + if (current_num_samples_ < file_count) { // casting to avoid overflowing return static_cast( @@ -888,7 +888,7 @@ void Version::Get(const ReadOptions& read_options, const LookupKey& k, GetContext get_context( user_comparator(), merge_operator_, info_log_, db_statistics_, status->ok() ? GetContext::kNotFound : GetContext::kMerge, user_key, - value, value_found, merge_context, this->env_, seq); + value, value_found, merge_context, this->env_); FilePicker fp( storage_info_.files_, user_key, ikey, &storage_info_.level_files_brief_,