mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 15:00:43 +02:00
Merge pull request #1560 from kmlebedev/fix_stat_read_only_volumes
avoid old values when missing read only flags
This commit is contained in:
1 file changed
+4
@@ -222,6 +222,10 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
|
|||||||
collectionVolumeSize[v.Collection] += volumeMessage.Size
|
collectionVolumeSize[v.Collection] += volumeMessage.Size
|
||||||
if v.IsReadOnly() {
|
if v.IsReadOnly() {
|
||||||
collectionVolumeReadOnlyCount[v.Collection] += 1
|
collectionVolumeReadOnlyCount[v.Collection] += 1
|
||||||
|
} else {
|
||||||
|
if _, exist := collectionVolumeReadOnlyCount[v.Collection]; !exist {
|
||||||
|
collectionVolumeReadOnlyCount[v.Collection] = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
location.volumesLock.RUnlock()
|
location.volumesLock.RUnlock()
|
||||||
|
|||||||
Reference in new issue
Block a user