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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
revert changes collectStatForOneVolume (#7199)
Dmitriy Pavlov0ac3c654801e
diff --git a/weed/storage/store.go b/weed/storage/store.goindex 77cd6c8249..1d625dd69e 100644--- a/weed/storage/store.go+++ b/weed/storage/store.go@@ -250,7 +250,19 @@ func collectStatForOneVolume(vid needle.VolumeId, v *Volume) (s *VolumeInfo) {DiskId: v.diskId,}s.RemoteStorageName, s.RemoteStorageKey = v.RemoteStorageNameKey()- s.Size, _, _ = v.FileStat()++ v.dataFileAccessLock.RLock()+ defer v.dataFileAccessLock.RUnlock()++ if v.nm == nil {+ return+ }++ s.FileCount = v.nm.FileCount()+ s.DeleteCount = v.nm.DeletedCount()+ s.DeletedByteCount = v.nm.DeletedSize()+ s.Size = v.nm.ContentSize()+return}