james-rms commented on code in PR #562:
URL:
https://github.com/apache/arrow-rs-object-store/pull/562#discussion_r2591409178
##########
src/aws/builder.rs:
##########
@@ -1185,8 +1193,20 @@ impl AmazonS3Builder {
S3EncryptionHeaders::default()
};
+ let multipart_copy_threshold = self
+ .multipart_copy_threshold
+ .map(|val| val.get())
+ .transpose()?
+ .unwrap_or(MAX_SINGLE_REQUEST_COPY_SIZE);
+ let multipart_copy_part_size = self
+ .multipart_copy_part_size
+ .map(|val| val.get())
+ .transpose()?
+ .unwrap_or(MAX_SINGLE_REQUEST_COPY_SIZE);
Review Comment:
I think if someone wants to push it over 5GB, they should be able to. There
are many "s3-compatible" object stores that might not share the same
limitations.
##########
src/aws/mod.rs:
##########
@@ -305,89 +365,80 @@ impl ObjectStore for AmazonS3 {
self.client.list_with_delimiter(prefix).await
}
- async fn copy_opts(&self, from: &Path, to: &Path, options: CopyOptions) ->
Result<()> {
- let CopyOptions {
- mode,
- extensions: _,
- } = options;
+ async fn copy(&self, from: &Path, to: &Path) -> Result<()> {
+ // Determine source size to decide between single CopyObject and
multipart copy
+ let head_meta = self
+ .client
+ .get_opts(
+ from,
+ GetOptions {
+ head: true,
+ ..Default::default()
+ },
+ )
+ .await?
+ .meta;
Review Comment:
Good point - let me see if that's straightforward.
--
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]