Support PutMultipartOptions for MultipartStore::create_multipart for AWS/GCP.#754
Merged
Conversation
Contributor
Author
|
@alamb Would greatly appreciate a review today to be able to make it into the release tomorrow, if not possible, disregard. If it doesn't cut the release tomorrow, about when will the next minor version release be? |
18 tasks
alamb
approved these changes
Jun 17, 2026
alamb
left a comment
Contributor
There was a problem hiding this comment.
Thank you @BearMinimum98 -- this change makes sense to me and I found the PR well documented and well tested
🙏
|
|
||
| let result = storage.get(&path).await.unwrap(); | ||
| assert_eq!(result.meta.size, chunk_size as u64 * 2); | ||
| // Some providers add default attributes, e.g. S3 may report a default Content-Type. |
| path: &Path, | ||
| opts: PutMultipartOptions, | ||
| ) -> Result<MultipartId> { | ||
| self.client.multipart_initiate(path, opts).await |
Contributor
There was a problem hiding this comment.
This makes sense to me as create_multipart is simply passing in PutMultipartOptions::default() -- adding the options explicitly makes sense
async fn create_multipart(&self, path: &Path) -> Result<MultipartId> {
self.client
.multipart_initiate(path, PutMultipartOptions::default())
.await
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Adds
PutMultipartOptionssupport to the low-levelMultipartStorecreate flow via a newcreate_multipart_optsmethod.This is implemented for AWS, GCP, in-memory, and wrapper stores. Azure returns
NotSupportedfor non-default tags/attributes because Azure applies these options when finalizing block uploads, not when creating them. Supporting this in the low-level API would require local upload state, which could leak if uploads are never completed or aborted.Closes #745
Rationale for this change
See issue.
What changes are included in this PR?
MultipartStore::create_multipart_optsPrefixStore/ThrottledStore, delegates options to the wrapped multipart storePartStorageuntil completionNotSupportedfor non-default tags/attributesAre there any user-facing changes?
Yes.
MultipartStorehas a new default method,create_multipart_opts, so existing implementations remain source-compatible.There are no breaking changes to the public API; the new method has a default implementation.