filer: support uploading file without needEnsureParentDir

This commit is contained in:
zzq09494
2022-03-17 10:53:47 +08:00
parent a6a8892255
commit 81cce4b4c3
7 changed files with 19 additions and 13 deletions

View File

@@ -148,7 +148,7 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
newEntry := filer.FromPbEntry(req.Directory, req.Entry)
newEntry.Chunks = chunks
createErr := fs.filer.CreateEntry(ctx, newEntry, req.OExcl, req.IsFromOtherCluster, req.Signatures)
createErr := fs.filer.CreateEntry(ctx, newEntry, req.OExcl, req.IsFromOtherCluster, req.Signatures,true)
if createErr == nil {
fs.filer.DeleteChunks(garbage)
@@ -271,7 +271,7 @@ func (fs *FilerServer) AppendToEntry(ctx context.Context, req *filer_pb.AppendTo
glog.V(0).Infof("MaybeManifestize: %v", err)
}
err = fs.filer.CreateEntry(context.Background(), entry, false, false, nil)
err = fs.filer.CreateEntry(context.Background(), entry, false, false, nil,true)
return &filer_pb.AppendToEntryResponse{}, err
}