diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-05-09 22:55:30 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-05-09 22:55:30 -0700 |
| commit | 280e7cf289b084ef06fe41ebdbb95a03bbfbe0c0 (patch) | |
| tree | 26154af787306549a93144a0b72c952507891f54 | |
| parent | 74052064b6ebfe5f0508914d0c74627734548c3e (diff) | |
| download | seaweedfs-280e7cf289b084ef06fe41ebdbb95a03bbfbe0c0.tar.xz seaweedfs-280e7cf289b084ef06fe41ebdbb95a03bbfbe0c0.zip | |
mount: in case the set attribute is called before persisting the file
| -rw-r--r-- | weed/filesys/file.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go index 122aeeef4..2b1eb5a44 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 }) |
