aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2020-10-25 16:21:40 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2020-10-25 16:21:40 +0500
commit2fb1fce8a07bd92fff03a34a17c3186aeca59a46 (patch)
tree4caa59d2722370704be89c751f5a47960c8f296c /weed
parentda36abf0339661df99d3694cc4dd233f21c5cea3 (diff)
downloadseaweedfs-2fb1fce8a07bd92fff03a34a17c3186aeca59a46.tar.xz
seaweedfs-2fb1fce8a07bd92fff03a34a17c3186aeca59a46.zip
avoid old values when missing read only flags
Diffstat (limited to 'weed')
-rw-r--r--weed/storage/store.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/store.go b/weed/storage/store.go
index 2cd237fcb..b9fcfcba9 100644
--- a/weed/storage/store.go
+++ b/weed/storage/store.go
@@ -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()