mvcc: set db size metric on restore

Fixes #8080
This commit is contained in:
Anthony Romano 2017-06-16 11:27:34 -07:00 committed by Gyu-Ho Lee
parent ff5be50ee5
commit ed7ef5be8b

View File

@ -254,6 +254,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