mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 01:37:00 +00:00
DO not report level size as zero when there are no files in L0
Summary: Instead of checking for number of files in L0. Check for number of files in the requested level. Bug introduced in D4929 (diff trying to do too many things). Test Plan: db_test. Reviewers: dhruba, MarkCallaghan Reviewed By: dhruba Differential Revision: https://reviews.facebook.net/D9483
This commit is contained in:
@@ -1657,10 +1657,8 @@ void VersionSet::AddLiveFilesCurrentVersion(std::set<uint64_t>* live) {
|
||||
int64_t VersionSet::NumLevelBytes(int level) const {
|
||||
assert(level >= 0);
|
||||
assert(level < NumberLevels());
|
||||
if(current_ && level < (int)current_->files_->size())
|
||||
return TotalFileSize(current_->files_[level]);
|
||||
else
|
||||
return 0;
|
||||
assert(current_);
|
||||
return TotalFileSize(current_->files_[level]);
|
||||
}
|
||||
|
||||
int64_t VersionSet::MaxNextLevelOverlappingBytes() {
|
||||
|
||||
Reference in New Issue
Block a user