Browse Source

fix stats when a collection is deleted

pull/2130/head
Chris Lu 4 years ago
parent
commit
56eb522b13
  1. 5
      weed/storage/store.go

5
weed/storage/store.go

@ -250,6 +250,11 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
}
if !deleteVolume {
collectionVolumeSize[v.Collection] += volumeMessage.Size
} else {
collectionVolumeSize[v.Collection] -= volumeMessage.Size
if collectionVolumeSize[v.Collection] <= 0 {
delete(collectionVolumeSize, v.Collection)
}
}
if _, exist := collectionVolumeReadOnlyCount[v.Collection]; !exist {

Loading…
Cancel
Save