Skip to content

Conversation

@james-rms
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Comment on lines +1196 to +1205
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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clamp to 5GiB because that's the documented maximum?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +369 to +387
// 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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this first try to use CopyObject and then fall back if it fails due to size?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - let me see if that's straightforward.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with that approach is that on error, AWS does not respond with anything more specific than "InvalidRequest":

<Error><Code>InvalidRequest</Code><Message>The specified copy source is larger than the maximum allowable size for a copy source: 5368709120</Message><RequestId>8550KAYYHRYF33SM</RequestId><HostId>R7zaiPWt96z/yQm2PtDT+pyFmYF76YCBcW0AeukdrXpS4qlSuO1nmXTFI4Ak2YcHMsBoymw33j4=</HostId></Error>

So there's not really a stable API for determining that the request is invalid because of the size of the source.

@james-rms james-rms force-pushed the jrms/0.12.4-aws-copy-etc branch from 5608942 to 68b24de Compare December 5, 2025 05:10
@james-rms james-rms changed the base branch from main to release/0.12 December 5, 2025 05:14
@james-rms james-rms force-pushed the jrms/0.12.4-aws-copy-etc branch from 6e4216a to 7fde896 Compare December 10, 2025 00:52
@james-rms james-rms changed the base branch from release/0.12 to main December 10, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants