1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-09-19 15:31:05 +02:00

avoid old values when missing read only flags

This commit is contained in:
Konstantin Lebedev 2020-10-25 16:21:40 +05:00
parent da36abf033
commit 2fb1fce8a0

View file

@ -222,6 +222,10 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
collectionVolumeSize[v.Collection] += volumeMessage.Size
if v.IsReadOnly() {
collectionVolumeReadOnlyCount[v.Collection] += 1
} else {
if _, exist := collectionVolumeReadOnlyCount[v.Collection]; !exist {
collectionVolumeReadOnlyCount[v.Collection] = 0
}
}
}
location.volumesLock.RUnlock()