mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
309fc66a2c
Summary: The macOS FUSE implementation has the concept of a daemon timeout, which is used to set an upper bound on the length of time that the kernel will wait for a request to be satisfied. If a request takes too long, the kernel will shutdown the fuse device and the user is left with a relatively broken experience in their repo until they restart the eden server. Critically, when it is left in the broken state it is hard for the user to realize that they need to restart the server because the kernel will still respond with EIO to file accesses within the mount; even though it has been stopped, it isn't fully unmounted until the fuse process stops. This diff introduces a self imposed timeout in the fuse processing flow and emits an ETIMEDOUT error when it is reached. The intent is that we'll configure this timeout to be smaller than the macOS daemon_timeout (which will be adjusted in a separate diff) so that we don't trigger the problematic behavior when the kernel decides that we've timedout. This change is made for all fuse implementations, not just macOS, for the sake of consistency: there's value to doing this on Linux as well, to avoid some deadlock like scenarios: this should put an upper bound on blocking in certain situations. I've made the timeout default to 60 seconds, but haven't added any configuration code for this yet; will do that in a follow on diff. Reviewed By: chadaustin Differential Revision: D16917954 fbshipit-source-id: 675539c43cf7f0009fd65d138081b9126464b7e0 |
||
---|---|---|
.. | ||
fuse_tester | ||
privhelper | ||
test | ||
BufVec.cpp | ||
BufVec.h | ||
CMakeLists.txt | ||
DirList.cpp | ||
DirList.h | ||
Dispatcher.cpp | ||
Dispatcher.h | ||
FileHandle.h | ||
FileHandleBase.cpp | ||
FileHandleBase.h | ||
FuseChannel.cpp | ||
FuseChannel.h | ||
FuseTypes.h | ||
InodeNumber.cpp | ||
InodeNumber.h | ||
PollHandle.cpp | ||
PollHandle.h | ||
RequestData.cpp | ||
RequestData.h |