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.

mount: in case the set attribute is called before persisting the file

Chris Lu280e7cf289b0
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index 122aeeef47..2b1eb5a447 100644
--- a/weed/filesys/file.go
+++ b/weed/filesys/file.go
@@ -336,20 +336,20 @@ func (file *File) saveEntry(entry *filer_pb.Entry) error {
file.wfs.mapPbIdFromLocalToFiler(entry)
defer file.wfs.mapPbIdFromFilerToLocal(entry)
- request := &filer_pb.UpdateEntryRequest{
+ request := &filer_pb.CreateEntryRequest{
Directory: file.dir.FullPath(),
Entry: entry,
Signatures: []int32{file.wfs.signature},
}
glog.V(4).Infof("save file entry: %v", request)
- _, err := client.UpdateEntry(context.Background(), request)
+ _, err := client.CreateEntry(context.Background(), request)
if err != nil {
glog.Errorf("UpdateEntry file %s/%s: %v", file.dir.FullPath(), file.Name, err)
return fuse.EIO
}
- file.wfs.metaCache.UpdateEntry(context.Background(), filer.FromPbEntry(request.Directory, request.Entry))
+ file.wfs.metaCache.InsertEntry(context.Background(), filer.FromPbEntry(request.Directory, request.Entry))
return nil
})