-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 Put IfMatch #6799
Comments
Do they support the full |
I think the docs haven't been updated yet, they often lag press releases by a day or so. Edit: I typoed the wrong header |
I think I'll be able to release this feature probably only next week, as we're going to only release patch changes before re:invent. It should be available in the |
As of today [0] S3 now supports the If-Match for in-place conditional writes. This commit adjusts the existing support for S3ConditionalPut::Etag mode for compatibility with real S3's particular semantics, which vary slightly from MinIO and R2. Specifically: * Real S3 can occasionally return 409 Conflict when concurrent If-Match requests are in progress. These requests need to be retried. * Real S3 returns 404 Not Found instead of 412 Precondition Failed when issuing an If-Match request against an object that does not exist. Fix apache#6799. [0]: https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes/
As of today [0] S3 now supports the If-Match for in-place conditional writes. This commit adjusts the existing support for S3ConditionalPut::Etag mode for compatibility with real S3's particular semantics, which vary slightly from MinIO and R2. Specifically: * Real S3 can occasionally return 409 Conflict when concurrent If-Match requests are in progress. These requests need to be retried. * Real S3 returns 404 Not Found instead of 412 Precondition Failed when issuing an If-Match request against an object that does not exist. Fix apache#6799. [0]: https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes/
I put up two PRs that should tackle this on the object-store side:
|
I've started working on the LocalStack implementation of S3 PutObject and CompleteMultipartUpload I just wanted to share a finding I had around the Similarly to
However, something that is undocumented for If you create an object with a I'm not too familiar with other cloud providers and I don't know their behavior, and I'm also not too familiar with conditional writes in themselves so maybe this behavior is expected and actually wanted, but it surprised me, so I wanted to share 😄 |
Ah, that is weird! Thanks very much for flagging. The good news for us is that right now the multipart put operation exposed by this crate doesn't support conditions. The one place where we do use conditional multipart puts is in the implementation of |
Awesome, I'm glad to hear that! Great, I think it is simpler that way, the multipart uploads are a bit tricky. And it does seem fine, yes! Also wanted to flag the fact that we do not really trigger
But it's going to be harder to implement for
We'll just lock it and raise 412 if the provided Anyway, just wanted to share the possible differences you might encounter. On another note, the |
|
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
S3 finally support this, so we can enable this by default 🎉
Describe the solution you'd like
Describe alternatives you've considered
Additional context
https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes/
The text was updated successfully, but these errors were encountered: