Skip to content

Commit

Permalink
mvcc: set db size metric on restore
Browse files Browse the repository at this point in the history
  • Loading branch information
heyitsanthony committed Jun 16, 2017
1 parent a825709 commit 7f149d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mvcc/kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ func (s *store) restore() error {
// restore index
tx := s.b.BatchTx()
tx.Lock()

dbTotalSize.Set(float64(s.b.Size()))

_, finishedCompactBytes := tx.UnsafeRange(metaBucketName, finishedCompactKeyName, nil, 0)
if len(finishedCompactBytes) != 0 {
s.compactMainRev = bytesToRev(finishedCompactBytes[0]).main
Expand Down

0 comments on commit 7f149d8

Please sign in to comment.