From af08337006d3d331b20a45e02047e129ebfd66ef Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 20 Nov 2026 04:56:23 -0800 Subject: [PATCH] filer: keep the chunks of a forwarded append whose outcome is unknown The owner may have committed before its reply was lost, and with separate per-filer stores the local lookup may not see that commit yet, so deleting the chunks it does not find can strip a committed append. Co-Authored-By: Claude Opus 5.5 --- weed/server/filer_server_handlers_write_autochunk.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go index fc4cd50924..c364fd6d7d 100644 --- a/weed/server/filer_server_handlers_write_autochunk.go +++ b/weed/server/filer_server_handlers_write_autochunk.go @@ -563,7 +563,9 @@ func (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileNa case routed && errors.Is(dbErr, filer_pb.ErrPreconditionFailed): replyerr = fmt.Errorf("entry %s changed during append; retry the request", path) case routed: - uncommittedChunks = fs.inlineAppendChunksNotReferenced(ctx, util.FullPath(path), uncommittedChunks) + // The owner may have committed before the reply was lost, and a + // separate local store may not hold that commit yet. + uncommittedChunks = nil case inlineAppendConverted: uncommittedChunks = fs.inlineAppendChunksNotReferenced(ctx, util.FullPath(path), mergedChunks) }