diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 6aaf6b2c4..a59da4317 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -378,13 +378,13 @@ void InternalStats::DumpCFStats(std::string* value) { // level order std::vector compaction_score(number_levels_, 0); for (int i = 0; i < num_levels_to_check; ++i) { - compaction_score[vstorage->compaction_level_[i]] = - vstorage->compaction_score_[i]; + compaction_score[vstorage->CompactionScoreLevel(i)] = + vstorage->CompactionScore(i); } // Count # of files being compacted for each level std::vector files_being_compacted(number_levels_, 0); for (int level = 0; level < num_levels_to_check; ++level) { - for (auto* f : vstorage->files_[level]) { + for (auto* f : vstorage->LevelFiles(level)) { if (f->being_compacted) { ++files_being_compacted[level]; } diff --git a/db/version_set.h b/db/version_set.h index 44e6f94b2..ae3d53cd2 100644 --- a/db/version_set.h +++ b/db/version_set.h @@ -345,8 +345,6 @@ class VersionStorageInfo { friend class Version; friend class VersionSet; - friend class DBImpl; - friend class InternalStats; // No copying allowed VersionStorageInfo(const VersionStorageInfo&) = delete; void operator=(const VersionStorageInfo&) = delete;