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 nil needle map

chrisluc278bac26388
diff --git a/weed/storage/volume_write.go b/weed/storage/volume_write.go
index ae607e691a..56010cea29 100644
--- a/weed/storage/volume_write.go
+++ b/weed/storage/volume_write.go
@@ -197,6 +197,10 @@ func (v *Volume) syncDelete(n *needle.Needle) (Size, error) {
v.dataFileAccessLock.Lock()
defer v.dataFileAccessLock.Unlock()
+ if v.nm == nil {
+ return 0, nil
+ }
+
if MaxPossibleVolumeSize < v.nm.ContentSize()+uint64(actualSize) {
err := fmt.Errorf("volume size limit %d exceeded! current size is %d", MaxPossibleVolumeSize, v.nm.ContentSize())
return 0, err