Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

avoid old values when missing read only flags

Konstantin Lebedev2fb1fce8a07b
diff --git a/weed/storage/store.go b/weed/storage/store.go
index 2cd237fcb5..b9fcfcba99 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()