diff --git a/db/compaction_job_stats_test.cc b/db/compaction_job_stats_test.cc index 2685f6e45..df38bd3b7 100644 --- a/db/compaction_job_stats_test.cc +++ b/db/compaction_job_stats_test.cc @@ -553,7 +553,7 @@ uint64_t EstimatedFileSize( uint64_t data_size = static_cast( num_records * (key_size + value_size * compression_ratio + - kPerKeyOverhead)); + kPerKeyOverhead)); return data_size + kFooterSize + num_records * bloom_bits_per_key / 8 // filter block diff --git a/db/db_test.cc b/db/db_test.cc index 699861806..2c502c329 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -5243,11 +5243,11 @@ class RecoveryTestHelper { int fd = open(filename.c_str(), O_RDWR); ASSERT_GT(fd, 0); - ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET)); + ASSERT_EQ(offset, lseek(fd, static_cast(offset), SEEK_SET)); void* buf = alloca(len); memset(buf, 'a', len); - ASSERT_EQ(len, write(fd, buf, len)); + ASSERT_EQ(len, write(fd, buf, static_cast(len))); close(fd); } diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 417c88ce3..d3e845875 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -43,9 +43,9 @@ void PrintLevelStatsHeader(char* buf, size_t len, const std::string& cf_name) { } void PrintLevelStats(char* buf, size_t len, const std::string& name, - int num_files, int being_compacted, double total_file_size, - double score, double w_amp, - const InternalStats::CompactionStats& stats) { + int num_files, int being_compacted, double total_file_size, + double score, double w_amp, + const InternalStats::CompactionStats& stats) { uint64_t bytes_read = stats.bytes_read_non_output_levels + stats.bytes_read_output_level; int64_t bytes_new = @@ -69,8 +69,8 @@ void PrintLevelStats(char* buf, size_t len, const std::string& name, "%9.0f " /* Comp(sec) */ "%9d " /* Comp(cnt) */ "%8.3f " /* Avg(sec) */ - "%7s " /* KeyIn */ - "%6s\n", /* KeyDrop */ + "%7s " /* KeyIn */ + "%6s\n", /* KeyDrop */ name.c_str(), num_files, being_compacted, total_file_size / kMB, score, bytes_read / kGB, stats.bytes_read_non_output_levels / kGB, @@ -687,7 +687,8 @@ void InternalStats::DumpCFStats(std::string* value) { comp_stats_[level].bytes_read_non_output_levels; PrintLevelStats(buf, sizeof(buf), "L" + ToString(level), files, files_being_compacted[level], - vstorage->NumLevelBytes(level), compaction_score[level], + static_cast(vstorage->NumLevelBytes(level)), + compaction_score[level], w_amp, comp_stats_[level]); value->append(buf); } diff --git a/db/version_set.cc b/db/version_set.cc index 40adcda5f..bd18bf3a5 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -871,20 +871,17 @@ Version::Version(ColumnFamilyData* column_family_data, VersionSet* vset, refs_(0), version_number_(version_number) {} -void Version::Get(const ReadOptions& read_options, const LookupKey& k, - std::string* value, Status* status, - MergeContext* merge_context, bool* value_found, - bool* key_exists, SequenceNumber* seq) { +void Version::Get(const ReadOptions& read_options, + const LookupKey& k, + std::string* value, + Status* status, + MergeContext* merge_context, + bool* value_found) { Slice ikey = k.internal_key(); Slice user_key = k.user_key(); assert(status->ok() || status->IsMergeInProgress()); - if (key_exists != nullptr) { - // will falsify below if not found - *key_exists = true; - } - GetContext get_context( user_comparator(), merge_operator_, info_log_, db_statistics_, status->ok() ? GetContext::kNotFound : GetContext::kMerge, user_key, diff --git a/include/rocksdb/delete_scheduler.h b/include/rocksdb/delete_scheduler.h index 788d59239..7c3eaee77 100644 --- a/include/rocksdb/delete_scheduler.h +++ b/include/rocksdb/delete_scheduler.h @@ -7,6 +7,7 @@ #include #include +#include #include "rocksdb/status.h"