Browse Source

Merge branch 'master' of https://github.com/seaweedfs/seaweedfs

pull/4651/head
chrislu 2 years ago
parent
commit
ab30f489c3
  1. 5
      weed/storage/store_vacuum.go

5
weed/storage/store_vacuum.go

@ -33,7 +33,10 @@ func (s *Store) CommitCompactVolume(vid needle.VolumeId) (bool, int64, error) {
if v := s.findVolume(vid); v != nil {
isReadOnly := v.IsReadOnly()
err := v.CommitCompact()
volumeSize, _, _ := v.DataBackend.GetStat()
var volumeSize int64 = 0
if err == nil && v.DataBackend != nil {
volumeSize, _, _ = v.DataBackend.GetStat()
}
return isReadOnly, volumeSize, err
}
return false, 0, fmt.Errorf("volume id %d is not found during commit compact", vid)

Loading…
Cancel
Save