mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
filer: check scoped updates before preparing chunks
This commit is contained in:
1 parent
7e5931ada6
commit
cede961372
1 file changed
+5
-4
@@ -1043,10 +1043,6 @@ func (fs *FilerServer) updateEntry(ctx context.Context, req *filer_pb.UpdateEntr
|
||||
if refusal != nil {
|
||||
return &filer_pb.UpdateEntryResponse{}, refusal
|
||||
}
|
||||
chunks, garbage, err := prepareChunks(ctx, fullpath, entry, req.Entry)
|
||||
if err != nil {
|
||||
return &filer_pb.UpdateEntryResponse{}, fmt.Errorf("UpdateEntry cleanupChunks %s: %w", fullpath, err)
|
||||
}
|
||||
if err := fs.checkScopeWorm(ctx, string(lockPath)); err != nil {
|
||||
return &filer_pb.UpdateEntryResponse{}, err
|
||||
}
|
||||
@@ -1058,6 +1054,11 @@ func (fs *FilerServer) updateEntry(ctx context.Context, req *filer_pb.UpdateEntr
|
||||
return &filer_pb.UpdateEntryResponse{}, err
|
||||
}
|
||||
|
||||
chunks, garbage, err := prepareChunks(ctx, fullpath, entry, req.Entry)
|
||||
if err != nil {
|
||||
return &filer_pb.UpdateEntryResponse{}, fmt.Errorf("UpdateEntry cleanupChunks %s: %w", fullpath, err)
|
||||
}
|
||||
|
||||
var newEntry *filer.Entry
|
||||
var stamp int64
|
||||
var unchanged bool
|
||||
|
||||
Reference in new issue
Block a user