Skip to content
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

Document suggested lifecycle rules for aborted multipart uploads #139

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions obstore/python/obstore/_put.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ def put(
entirety of `file` to `location`, or fail. No clients should be able to observe a
partially written object.

!!! warning "Aborted multipart uploads"
This function will automatically use [multipart
uploads](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html)
under the hood for large file objects (whenever the length of the file is
greater than `chunk_size`) or for iterable or async iterable input.

Multipart uploads have a variety of advantages, including performance and
reliability.

However, aborted or incomplete multipart uploads can leave partial content in a
hidden state in your bucket, silently adding to your storage costs. It's
recommended to configure lifecycle rules to automatically delete aborted
multipart uploads. See
[here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpu-abort-incomplete-mpu-lifecycle-config.html)
for the AWS S3 documentation, for example.

You can turn off multipart uploads by passing `use_multipart=False`.

Args:
store: The ObjectStore instance to use.
path: The path within ObjectStore for where to save the file.
Expand Down
Loading