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.

Update disk_location_ec.go (#6359)

coffeecloudgitc531e2eb0e59
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go
index bb57388974..ac8d52fb76 100644
--- a/weed/storage/disk_location_ec.go
+++ b/weed/storage/disk_location_ec.go
@@ -195,6 +195,10 @@ func (l *DiskLocation) loadAllEcShards() (err error) {
}
func (l *DiskLocation) deleteEcVolumeById(vid needle.VolumeId) (e error) {
+ // Add write lock since we're modifying the ecVolumes map
+ l.ecVolumesLock.Lock()
+ defer l.ecVolumesLock.Unlock()
+
ecVolume, ok := l.ecVolumes[vid]
if !ok {
return