tustvold commented on code in PR #5652:
URL: https://github.com/apache/arrow-rs/pull/5652#discussion_r1567377130


##########
object_store/src/aws/client.rs:
##########
@@ -513,41 +512,29 @@ impl S3Client {
     }
 
     /// Make an S3 Copy request 
<https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html>
-    pub fn copy_request<'a>(&'a self, from: &'a Path, to: &Path) -> 
Request<'a> {
-        let url = self.config.path_url(to);
+    pub fn copy_request<'a>(&'a self, from: &Path, to: &'a Path) -> 
Request<'a> {
         let source = format!("{}/{}", self.config.bucket, encode_path(from));
-
-        let builder = self
-            .client
-            .request(Method::PUT, url)
-            .header("x-amz-copy-source", source)
-            .headers(self.config.encryption_headers.clone().into());
-
-        Request {
-            builder,
-            path: from,
-            config: &self.config,
-            payload: None,
-            payload_sha256: None,
-            use_session_creds: false,
-            idempotent: false,
-        }
+        self.request(Method::PUT, to)
+            .idempotent(true)

Review Comment:
   CopyObject is idempotent



-- 
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]

Reply via email to