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.

add warning for empty attributes

Chris Lubea162c34c84
diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go
index ca318db051..42069c54c0 100644
--- a/weed/server/filer_grpc_server.go
+++ b/weed/server/filer_grpc_server.go
@@ -113,6 +113,10 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
fs.filer.DeleteChunks(garbages)
+ if req.Entry.Attributes == nil {
+ return nil, fmt.Errorf("can not create entry with empty attributes")
+ }
+
err = fs.filer.CreateEntry(&filer2.Entry{
FullPath: fullpath,
Attr: filer2.PbToEntryAttribute(req.Entry.Attributes),