-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Object Store, return version & etag on multipart put. #5443
Comments
The reason PutPart and MultipartStore are separate is largely historical, PutPart came first. That being said, removing PutPart would be a breaking change and doesn't seem like it would materially reduce code, as the underlying logic is already shared. R.e. returning PutPart from ObjectStore, this would prevent implementation for LocalFilesystem and other stores that don't have native multipart. In the short-term the ETag could be obtained by performing a HEAD request afterwards, I will have a think about how we might support this better going forwards |
Thanks for the context!
I was thinking PutPart could be returned from MultiPartStore trait, not ObjectStore. If that first part is done, then just exposing PutResult on the WriteMultiPart struct would resolve this issue. Let me know if you'd like a PR for that, I can do it. |
The major challenge with returning PutPart from MultipartStore, is that we need to preserve the ability to resume existing uploads identified by MultipartId (#4961). I need to think a bit on it more but the following changes make sense to me:
These are all relatively straightforward changes that shouldn't be too painful for downstreams |
Yes that sounds great!
…On Wed, Feb 28, 2024, 10:43 PM Raphael Taylor-Davies < ***@***.***> wrote:
The major challenge with returning PutPart from MultipartStore, is that we
need to preserve the ability to resume existing uploads identified by
MultipartId (#4961 <#4961>).
I need to think a bit on it more but the following changes make sense to
me:
- Add a MultipartUpload that can be created from a MultipartStore and
MultipartId and implements PutPart
- Update PutPart::complete to return PutResult
- Add a method to WriteMultiPart to retrieve the PutResult if the
upload is finished
—
Reply to this email directly, view it on GitHub
<#5443 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEZKHMTKX7LNJOVSHTPFN3YV2RVDAVCNFSM6AAAAABD6JTYR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZQGM2DENRQGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
See #5458 for a more holistic re-imagining of how we handle streaming uploads |
For anyone following along, an API proposal is in this PR: #5500 |
|
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
To protect integrity of our uploads, we store object versions together with s3 file paths. This is currently easy for regular
ObjectStore::put
requests, but is not possible with multipart uploads when usingObjectStore::put_multipart
. The current return values of the latter (MultipartId and AsyncWrite) do not allow for an easy return of values, so maybe it's possible to add this toWriteMultiPart
(so that we don't reimplement it using justMultiPartStore
/PutPart
traits).Describe the solution you'd like
create_multipart
, it just returns a multipart id. Maybe add acreate_multipart_put_part(&self, path: &Path) -> Result<Box<dyn PutPart>>
? This will enable using WriteMultiPart on any MultiPartStore from the client code. This is good because then users can tune WriteMultiPart parameters like concurrency and potentially part size.PutPart::complete
should returnResult<PutResult>
WriteMultiPart
should remember this PutResult and provide a method to take it after shutdown is polled to completion.After a bit more analysis, it looks like PutPart and MultiPartStore are duplicating put_part and complete methods. Plus, it looks like you can create a generic PutPart implementation given just the MultiPartStore interface. What do you think about simplifying this? There are 2 options:
Describe alternatives you've considered
Additional context
I'm using version 0.9.
The text was updated successfully, but these errors were encountered: