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.

Fix panic error when target collection is not exist.

Xinran Xu4a0939a4e4e0
diff --git a/weed/topology/topology.go b/weed/topology/topology.go
index 1c5633e953..27d22ee7e4 100644
--- a/weed/topology/topology.go
+++ b/weed/topology/topology.go
@@ -116,6 +116,9 @@ func (t *Topology) GetVolumeLayout(collectionName string, rp *storage.ReplicaPla
func (t *Topology) FindCollection(collectionName string) (*Collection, bool) {
c, hasCollection := t.collectionMap.Find(collectionName)
+ if !hasCollection {
+ return nil, false
+ }
return c.(*Collection), hasCollection
}