From 5594d446ffa256ccecbbeb28c8c22561752707c7 Mon Sep 17 00:00:00 2001 From: Lei Jin Date: Fri, 31 Oct 2014 15:04:39 -0700 Subject: [PATCH] unfriend DBImpl and InternalStats from VersionStorageInfo Summary: as title Test Plan: make release Reviewers: sdong, yhchiang, rven, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D28053 --- db/internal_stats.cc | 6 +++--- db/version_set.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 6aaf6b2c47..a59da43171 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 44e6f94b24..ae3d53cd2d 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;