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
main
Lei Jin 10 years ago
parent 82e3ae5403
commit 5594d446ff
  1. 6
      db/internal_stats.cc
  2. 2
      db/version_set.h

@ -378,13 +378,13 @@ void InternalStats::DumpCFStats(std::string* value) {
// level order
std::vector<double> 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<int> 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];
}

@ -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;

Loading…
Cancel
Save