mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
* filer: refuse unsafe chunk appends * filer: report append representation preconditions * filer: cover cached remote append eviction safety * filer: cover lazy remote append refusal * filer: refuse HTTP appends and offset writes onto remote-only entries An HTTP append or offset write onto a remote-only entry stored the new chunk with nothing below it, so reads returned zeros where the remote bytes were and the entry stopped being remote-only. Small appends failed with a retryable "inline file changed" error instead. Refuse both with a client error, matching AppendToEntry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer: AppendToEntry appends after a sparse tail AppendToEntry placed new chunks at the end of the existing chunks, so a file extended past them by a truncate got the appended bytes inside its logical length instead of after it, and its size did not grow. Use the entry size, as the HTTP append path does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.2 KiB
Go
21 lines
1.2 KiB
Go
package constants
|
|
|
|
// Filer error messages — shared between filer (producing) and S3 API (matching).
|
|
// These cross a gRPC boundary as strings in CreateEntryResponse.Error, so typed
|
|
// errors cannot be used. Keeping the strings in one place prevents mismatches.
|
|
const (
|
|
ErrMsgOperationNotPermitted = "operation not permitted"
|
|
ErrMsgBadDigest = "The Content-Md5 you specified did not match what we received."
|
|
ErrMsgEntryNameTooLong = "entry name too long"
|
|
// Unsupported write-mode combinations; deterministic client errors.
|
|
ErrMsgAppendSaveInsideChunked = "append saved inside the entry to a chunked file is not supported"
|
|
ErrMsgAppendInlineMode = "append to inline content with this storage mode is not supported"
|
|
ErrMsgOffsetWriteInline = "offset write to inline small file is not supported yet"
|
|
ErrMsgPartialWriteRemoteOnly = "append or offset write to a remote-only entry is not supported; cache it first"
|
|
// Suffix appended to a path, e.g. "/buckets/b/foo/bar is a file"
|
|
ErrMsgIsAFile = " is a file"
|
|
// Prefix + suffix, e.g. "existing /buckets/b/foo is a directory"
|
|
ErrMsgExistingPrefix = "existing "
|
|
ErrMsgIsADirectory = " is a directory"
|
|
)
|