Skip to content

Commit

Permalink
db.go: Don't skip some level
Browse files Browse the repository at this point in the history
we get LevelTablesCounts = [65,34], seems L0 file num is 65
after reopen db,  LevelTablesCounts = [1,65,34]
the origin LevelTablesCounts should be [0,65,34]
if it skip some level, we have no any ideal what the Stat we get really
means
  • Loading branch information
july2993 committed Jun 23, 2019
1 parent c3a204f commit c8392d1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions leveldb/db.go
Expand Up @@ -1070,9 +1070,7 @@ func (db *DB) Stats(s *DBStats) error {

for level, tables := range v.levels {
duration, read, write := db.compStats.getStat(level)
if len(tables) == 0 && duration == 0 {
continue
}

s.LevelDurations = append(s.LevelDurations, duration)
s.LevelRead = append(s.LevelRead, read)
s.LevelWrite = append(s.LevelWrite, write)
Expand Down

0 comments on commit c8392d1

Please sign in to comment.