Browse Source
Merge pull request #1560 from kmlebedev/fix_stat_read_only_volumes
avoid old values when missing read only flags
pull/1561/head
Chris Lu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
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() |
|
|
|