mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 21:35:58 +03:00
[GH-ISSUE #1062] investigate macOS integration test workarounds #583
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#583
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 @gaul on GitHub (Jun 30, 2019).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1062
Several tests including
test_append_filehave a suspicious workaround:Without it s3fs returns stale metadata from the stat cache. Comparing logs confuses me but it appears that the flush happens later than on Linux. @ggtakec do you have any idea why this is necessary?
@ggtakec commented on GitHub (Jul 16, 2019):
@gaul It was a code added by #630 PR.
At this time, maybe I added it to pass OSX tests, but this may have hidden the bug.
If you cut this code now, will it not cause an error on OSX?
If errors occur, I will try to investigate.
If it does not occur, we should remove this code immediately.
@gaul commented on GitHub (Jul 16, 2019):
Removing these causes the tests to fail. I looked into this but I don't understand the failure.
@ggtakec commented on GitHub (Aug 1, 2019):
I remembered this reason, I think this depends on the behavior of osxfuse.
I did not pass the test(test_external_modification) at hand now, then I investigated and remembered.
The test fails if the file is written and read immediately after startup s3fs. This is because s3fs_read() handler is not called by osxfuse.
You can do same issue:
This seems to be related to the handling of "struct fuse_file_info * fi" inside osxfuse, but the details are unknown.
Issues that seem to be related: https://github.com/osxfuse/osxfuse/issues/203
Now I read and write only once to avoid this(cat /dev/null > file).
However, this workaround is not good, so we need to find a way to escape this(or osxfuse issue).
@ggtakec commented on GitHub (Aug 3, 2019):
@gaul
In the case of osxfuse, it seems that read system call is not called when it is cached (by OS or fuse).
I could not find the same phenomenon with libfuse for linux.
The explanation of fuse (osxfuse) is as follows.
So I tried the
kernel_cacheanddirect_iooptions and confirmed that the read system call was called.Note that if user specify the
kernel_cacheoption, when user change the file from the outside (by the aws command etc.), the change can not be detected.In other words, in the case of osx, I think that the problem can be avoided by attaching
direct_io.As a result, it has not been measured how much the system calls will increase and how much the performance will decrease.
However, it is necessary to pass test_external_modification tests and other tests with osx.
If there is no problem, I delete the indicated branch statement of test_append_file test, change travis.yaml, and send PR.
@ggtakec commented on GitHub (Aug 6, 2019):
By specifying the direct_io option, this unnecessary code could be removed.
However, when using osxfuse 3.8.0 or earlier, direct_io causes a problem with append redirect.
For this reason, brew needs to be updated in osx tests.
As a result, the osx test time exceeds 12 minutes.
This is reflected in the PR of #1119.
@ggtakec commented on GitHub (Aug 6, 2019):
Since test_read_external_object test still fails in osx, add auto_cache( #1120 ) option in addition to direct_io.
@ggtakec commented on GitHub (Aug 6, 2019):
This issue-related PR has been merged earlier in order to pass other PRs and tests without problems.
If there is a problem with the correction, please let me know.