Repository navigation
Fix S3 conditional writes - #2754
Conversation
|
|
7efb4e3 to
35175dc
Compare
…ers as missing - CompleteMultipartUpload now enforces If-Match (NoSuchKey on a missing key, 412 on an ETag mismatch) alongside If-None-Match, at the initial check and again under the write lock. - A re-completion of an already-completed upload no longer returns a current delete marker as the completed object. - DeleteObject If-Match returns NoSuchKey when the current version is a delete marker. - Unit coverage plus an aws-sdk-rust E2E for the versioned-bucket delete-then-recreate flow.
|
Thanks a lot for this, @freakinhippie. Conditional writes are exactly the kind of thing people lean on fakecloud to get right, and this closes a real gap from #2741. I pushed a few follow-ups before merging: CompleteMultipartUpload now honors If-Match as well as If-None-Match (missing key -> NoSuchKey, mismatch -> 412), the conditions are re-checked under the write lock so a concurrent write can't slip between check and commit, and delete markers now count as a missing key for both the multipart conditions and DeleteObject If-Match. Added unit tests for each path plus an E2E test covering conditional writes after a versioned delete. Merged. Really appreciate the contribution. |
Fixes #2741
Conditional S3 writes treated a current delete marker as a live object, preventing keys from being recreated after deletion in versioned buckets.
Adds unit coverage for conditional creation of a missing key, recreation after a versioned delete, and If-Match against a delete marker.