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
This commit is contained in:
Lei Jin 2014-10-31 15:04:39 -07:00
parent 82e3ae5403
commit 5594d446ff
2 changed files with 3 additions and 5 deletions

View File

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

View File

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