mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-14 07:48:41 +01:00
mount: stop a flush merge once a filer accepts the write
withFilerClient can call the callback on several filers. A refusal from one left its stored entry behind, so a later filer's success went on to another merge round. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5fcd9d81e9
commit
c3c4085a81
1 file changed
+2
-1
@@ -338,6 +338,7 @@ func (wfs *WFS) createContentEntry(ctx context.Context, fh *FileHandle, request
|
||||
var stored *filer_pb.Entry
|
||||
err = wfs.withFilerClient(ctx, false, wfs.filerRPCWait(), func(ctx context.Context, client filer_pb.SeaweedFilerClient) error {
|
||||
var callErr error
|
||||
stored = nil
|
||||
resp, callErr = filer_pb.CreateEntryWithResponse(ctx, client, request)
|
||||
if base == nil || attempt >= maxContentFlushMerges || !errors.Is(callErr, filer_pb.ErrPreconditionFailed) {
|
||||
return callErr
|
||||
@@ -351,7 +352,7 @@ func (wfs *WFS) createContentEntry(ctx context.Context, fh *FileHandle, request
|
||||
merged = proto.Clone(request.Entry).(*filer_pb.Entry)
|
||||
wfs.mapPbIdFromFilerToLocal(merged)
|
||||
}
|
||||
if stored == nil {
|
||||
if err == nil || stored == nil {
|
||||
return resp, merged, err
|
||||
}
|
||||
next, ok := mergeContentEntry(stored, base, local, sent)
|
||||
|
||||
Reference in new issue
Block a user