aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
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()