Skip to content

Test empty objects, conflicts, errors in a 200, and object sizes on multipart writes - #10

Open
tiptenbrink wants to merge 2 commits into
masterfrom
multipart-edges
Open

tiptenbrink wants to merge 2 commits into
masterfrom
multipart-edges

Conversation

@tiptenbrink

@tiptenbrink tiptenbrink commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • An empty object through multipart, on S3 and S3 Express:

    • stage-empty-part stages a part with an empty body, which S3 takes.
    • commit-one-empty-part completes an upload of that one part, which writes an empty object.
    • S3 refuses a completion of no parts, and commit-nothing lets a client refuse one locally. Its neighbor that a client must send is now commit-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 ConditionalRequestConflict when 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-conflict accepts the error, and up to five retries before it, which it never requires.
    • commit-conditional-conflict accepts no retry: a client must not send the completion again.
    • S3 sends the 409 only during such a race, so both cases are 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 an InternalError there as a server error. copy-200-internal-error and commit-200-internal-error accept 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 new object_size. commit-object-size succeeds. In commit-object-size-mismatch the parts add up to 3 bytes and the header says 4: a general-purpose bucket answers 400 InvalidRequest, 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 InternalError in 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_size is a new field of s3.complete_multipart.

Test plan

  • object-tests validate cases/operations.json passes (931 cases).

tiptenbrink and others added 2 commits September 29, 2026 19:10
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]>
@tiptenbrink tiptenbrink changed the title Test an empty object through multipart, and a 409 conflict on writes Test empty objects, conflicts, errors in a 200, and object sizes on multipart writes Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant