mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #1595] -o nomultipart will be ignored #840
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#840
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CarstenGrohmann on GitHub (Mar 4, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1595
As I understand
-o nomultipartdisables multipart uploads. For me, this means that only files up to 5GB (limit of the single upload) can be written to the bucket. Writing larger files would have to be aborted with an EFBIG error.But currently s3fs uses multipart upload request (
POST /mybucket/bigfile?uploadsandPUT /mybucket/bigfile?partNumber=1...) instead of a simplePUT /bigfileas described in PutObject API documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html).Is this intended or an error in the application?
Version of s3fs being used (s3fs --version)
Steps to reproduce
s3fs command line and debug output
First write request:
@gaul commented on GitHub (Mar 4, 2021):
This is not what I observe:
@CarstenGrohmann commented on GitHub (Mar 4, 2021):
I don't know when s3fs will switch to multipart uploads. It uses single uploads till 3000M, as shown in your example. Starting somewhere between 3615MB and 3750M s3fs is using multipart uploads.
These tests have been executed with
@gaul commented on GitHub (Mar 4, 2021):
Something strange is going on. I successfully uploaded the same file with a single part:
@CarstenGrohmann commented on GitHub (Mar 5, 2021):
We see differences in the size of
/tmponly.The free disk space is checked in
github.com/s3fs-fuse/s3fs-fuse@8c58ba8ac0/src/fdcache_entity.cpp (L1437)at
github.com/s3fs-fuse/s3fs-fuse@8c58ba8ac0/src/fdcache_entity.cpp (L1467)and when this check fails, all content will be immediately uploaded
github.com/s3fs-fuse/s3fs-fuse@8c58ba8ac0/src/fdcache_entity.cpp (L1482-L1492)I've 3997376 KB free in
/tmp. That's enough space for the smaller transfers till ca. 3.5GB. These will be uploaded with a single operation. But's not enough for larger transfers. Therefore they will be uploaded using multipart as described above.You should able to reproduce this issue even with smaller transfers, if you fill
/tmptemporarily.What would be the correct behaviour of s3fs for "-o nomultipart" when
/tmpis full? Return fromFdEntity::Write()withENOSPC("No space left on device")?@CarstenGrohmann commented on GitHub (Mar 5, 2021):
A small hack
confirms the execution path described in the last comment:
@CarstenGrohmann commented on GitHub (Mar 8, 2021):
I can provide this small fix that returns
ENOSPCfornomultipartinstead of silently switching to multipart uploads if the temp space has been filled. I can submit a PR if you agree with this change.Exampe:
New syslog output w/ warning:
New debug output w/ warning:
@gaul commented on GitHub (Mar 9, 2021):
Great investigative work! I agree with this approach; could you submit a pull request?