You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wjones127 (via GitHub)" <gi...@apache.org> on 2024/08/21 17:26:54 UTC

[I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

wjones127 opened a new issue, #6285:
URL: https://github.com/apache/arrow-rs/issues/6285

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   This is now supported on S3: https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-s3-conditional-writes/
   
   **Describe the solution you'd like**
   
   We should make sure this works out-of-the-box. Also need to maintain compatibility with Minio, Localstack, and CloudFlare R2.
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #6285: object_store: Conditional put and rename_if_not_exist on S3
URL: https://github.com/apache/arrow-rs/issues/6285


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #6285: object_store: Conditional put and rename_if_not_exist on S3
URL: https://github.com/apache/arrow-rs/issues/6285


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "fhilgers (via GitHub)" <gi...@apache.org>.
fhilgers commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2349244241

   One idea maybe would be to use the conditional Put with the `if-none-match` header to create a dummy file and if that succeeds to copy. However this is not atomic and in the case where a client willingly overwrote the dummy file prior to the copy completing their file would be overwritten by the copy?
   
   Is this that bad? In the cases where clients use conditonal operations everything is safeguarded and in the cases where clients already just overwrite a file it does not change anything because there is no guarantee that another client will not overwrite anything. In terms of client making sure that there is no overwriting happening, conditional put on a client and then force copying should semantically be the same as conditional copy, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2499218573

   FYI the support has been broadened to not just wildcards
   
   https://github.com/apache/arrow-rs/issues/6799


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "rtyler (via GitHub)" <gi...@apache.org>.
rtyler commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2338497553

   @wjones127 :wave: if you find yourself too busy with other things, I could probably take a crack at this :smile: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "fhilgers (via GitHub)" <gi...@apache.org>.
fhilgers commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2350804999

   After playing around a bit, I found out that this can be worked around just by using multipart copy:
   
   1. Initiate Multipart Upload
   2. Upload Part Copy
   3. Supply `if-none-match` to Complete Multipart Upload
   
   Using the header just for `CopyObject` results in an NotImplemented error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2741681102

   Migrating from arrow-rs issue [#6285](https://github.com/apache/arrow-rs/issues/6285)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "benesch (via GitHub)" <gi...@apache.org>.
benesch commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2499715249

   PRs are up! https://github.com/apache/arrow-rs/issues/6799#issuecomment-2499713001


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "fhilgers (via GitHub)" <gi...@apache.org>.
fhilgers commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2349218970

   How do you plan on implementing `ObjectStore::copy_if_not_exists`. The new conditional features from aws only allow checking etag on the source for copy operations. `x-amz-copy-source-if-match` and `x-amz-copy-source-if-match` only check the source, not the destination as far as i understand (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html). Is there a workaround through the conditonal Put operadions? 
   
   Minio already supported these headers prior to AWS, but has anyone tried to use Minio for the conditional operations without dynamodb?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "benesch (via GitHub)" <gi...@apache.org>.
benesch commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2456400218

   I put up https://github.com/apache/arrow-rs/pull/6682, which implements both `PutMode::Create` and `copy_if_not_exists` for native Amazon S3. I'm unfamiliar with the maintainership for `object_store` so if someone can tag in the right folks to review, I'd be much obliged!
   
   > After playing around a bit, I found out that this can be worked around just by using multipart copy:
   > 
   > 1. Initiate Multipart Upload
   > 2. Upload Part Copy
   > 3. Supply `if-none-match` to Complete Multipart Upload
   
   @fhilgers thanks for the pointer here. Indeed that seems to work as expected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "wjones127 (via GitHub)" <gi...@apache.org>.
wjones127 commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2338564983

   I haven't finished this.
   
   But from what's I've looked at, it's already implemented. It's just a matter of changing the default behavior / configuration and documenting and testing that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] object_store: Conditional put and rename_if_not_exist on S3 [arrow-rs]

Posted by "bentsku (via GitHub)" <gi...@apache.org>.
bentsku commented on issue #6285:
URL: https://github.com/apache/arrow-rs/issues/6285#issuecomment-2303382082

   We are implementing it on LocalStack, should be available in `latest` by tomorrow: https://github.com/localstack/localstack/pull/11402
   
   From what I've seen, it's less powerful than R2, as you cannot specify any value other than `*` in `If-None-Match` (or it raises an exception), so you might need different code path between S3 and R2, for example. Also, they didn't implement it for `CopyObject` apparently, but it is implemented for `CompleteMultipartUpload`. The logic is somewhat [a bit complicated](https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html#conditional-error-response), especially the "delete after initiation" where you need to recreate a complete multipart upload.
   
   I was already looking for the PR/feature request here 😄  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org