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.

use volumes variable

WenLong LIb9068c130409
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go
index c656da4caa..9589d92810 100644
--- a/weed/storage/disk_location.go
+++ b/weed/storage/disk_location.go
@@ -164,11 +164,11 @@ func (l *DiskLocation) UnloadVolume(vid VolumeId) error {
l.Lock()
defer l.Unlock()
- _, ok := l.volumes[vid]
+ v, ok := l.volumes[vid]
if !ok {
return fmt.Errorf("Volume not loaded, VolumeId: %d", vid)
}
- l.volumes[vid].Close()
+ v.Close()
delete(l.volumes, vid)
return nil
}