tustvold commented on code in PR #6682:
URL: https://github.com/apache/arrow-rs/pull/6682#discussion_r1834537444
##########
object_store/src/aws/mod.rs:
##########
@@ -293,6 +297,47 @@ impl ObjectStore for AmazonS3 {
let (k, v, status) = match &self.client.config.copy_if_not_exists {
Some(S3CopyIfNotExists::Header(k, v)) => (k, v,
StatusCode::PRECONDITION_FAILED),
Some(S3CopyIfNotExists::HeaderWithStatus(k, v, status)) => (k, v,
*status),
+ Some(S3CopyIfNotExists::Multipart) => {
+ let upload_id = self
+ .client
+ .create_multipart(to, PutMultipartOpts::default())
+ .await?;
+
+ let res = async {
+ let part_id = self
+ .client
+ .put_part(to, &upload_id, 0,
PutPartPayload::Copy(from))
+ .await?;
Review Comment:
I think this error should also trigger cleanup, might be worth encapsulating
the steps into a function
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]