mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #1310] fuse cache on write #701
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#701
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 @tsmgeek on GitHub (Jun 18, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1310
Is there any caching at the fuse layer of files being written?
Im trying to track down a problem where uploaded files are zero filesize when I look at them after a mins etc if I check again its actually 0 bytes on storage.
I am wondering if there is a possibility that there was a failure to transfer the binary data to S3 resulting in an empty file but still reports that it was successfully written when immediately doing a stat call.
@gaul commented on GitHub (Jul 26, 2020):
When creating a new file, s3fs creates a zero-byte stub object with file metadata. During writes, s3fs caches files locally until the application calls
fsyncorclose. This means that accessing the file via s3fs may report one size while an external tool might report zero bytes. Does this explain the behavior you observed?@tsmgeek commented on GitHub (Jul 26, 2020):
I'm observing that any process on the same node sees the file correctly, on S3 it's zero file size even after fclose. It's like the write failed, left the stub file on S3 but reported back it was a successful write.
I assume you are saying the zero-stub is written to S3 itself as a form of lock, if this is the case it would be nice to be able to toggle this off and only write whole object on fclose.
@gaul commented on GitHub (Aug 1, 2020):
Discussed in https://github.com/s3fs-fuse/s3fs-fuse/issues/1013#issuecomment-484076448.
@tsmgeek commented on GitHub (Aug 1, 2020):
@gaul yes that seems to cover part of the issue.
Adding a WORM flag as per the other ticket looks like it would help the issue as any failed write of the data would not leave zero file on storage.
Note I'm using wasabi s3 storage which I think is based on ceph, worm would help as they also have a 90 day retention limit with mimimum billable file size.
@gaul commented on GitHub (Oct 23, 2021):
@tsmgeek Does the fix for #1013 address your symptoms? Could you test with the latest version 1.90?
@tsmgeek commented on GitHub (Oct 26, 2021):
@gaul I think it may do, ile have to deploy latest s3fs on our platform to confirm.
We recoded some parts to use S3 api directly due to this issue and also added retry loops in to fix this problem so most of it was hidden away by though two fixes.