Test empty objects, conflicts, errors in a 200, and object sizes on multipart writes - #10
Open
tiptenbrink wants to merge 2 commits into
Open
tiptenbrink wants to merge 2 commits into
tiptenbrink wants to merge 2 commits into
Conversation
stage-empty-part and commit-one-empty-part write an empty object from one empty part on S3 and Express, and commit-nothing's refusal now names that completion as its neighbor. commit-conditional-conflict and put-conditional-conflict answer a conditional write with 409 ConditionalRequestConflict: a put may be retried, as AWS advises, and a completion may not. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
copy-200-internal-error and commit-200-internal-error answer 200 with an InternalError body, which AWS documents for these operations; a client may retry and must report the error. commit-object-size and commit-object-size-mismatch send x-amz-mp-object-size, the call's new object_size: a general-purpose bucket refuses a mismatch with 400, and a directory bucket with the error in a 200. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An empty object through multipart, on S3 and S3 Express:
stage-empty-partstages a part with an empty body, which S3 takes.commit-one-empty-partcompletes an upload of that one part, which writes an empty object.commit-nothinglets a client refuse one locally. Its neighbor that a client must send is nowcommit-one-empty-part, so a client that refuses no parts must still write an empty object this way.A 409 conflict on a conditional write, on S3. S3 answers
ConditionalRequestConflictwhen a conditional write meets a concurrent one. AWS advises retrying a PutObject, but not a CompleteMultipartUpload: after the conflict, the caller starts a new upload and stages every part again. So:put-conditional-conflictaccepts the error, and up to five retries before it, which it never requires.commit-conditional-conflictaccepts no retry: a client must not send the completion again.transient. Their requests are verified against the 412 that S3 answers them now.An error in a 200, on S3 and S3 Express. AWS documents that CopyObject, UploadPartCopy and CompleteMultipartUpload may answer 200 with an
<Error>body, and advises treating anInternalErrorthere as a server error.copy-200-internal-errorandcommit-200-internal-erroraccept the error, with up to five optional retries before it, and never a success.A stated object size, on S3 and S3 Express. A completion may send the size it expects in
x-amz-mp-object-size, the call's newobject_size.commit-object-sizesucceeds. Incommit-object-size-mismatchthe parts add up to 3 bytes and the header says 4: a general-purpose bucket answers 400InvalidRequest, and a directory bucket sends the same error in a 200.All cases were verified live. The AWS C++ SDK passes the empty-part, conflict and object-size cases on S3. It reports an
InternalErrorin a 200 with an empty code, and an Express completion error with status -1, as it does elsewhere.For clients
A client that retries a completion after a 409 fails
commit-conditional-conflict.A retry is never required: every retry exchange is optional.
object_sizeis a new field ofs3.complete_multipart.Test plan
object-tests validate cases/operations.jsonpasses (931 cases).