mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
fab0c4071c
Summary: This moves the bind mounting and post-clone script running functionality to methods of the EdenMount class and makes the whole mount flow return a `Future<>`. The higher level goal is to make it easier to see where and how we want to tweak this flow to support graceful restart. This is mostly straight forward but care is required to avoid deadlocks; there are two scenarios: # We fulfill the fuse start promise in the context of the fuse thread that is handling the fuse initialization packet before it has signalled to the kernel that it has come up. This can be solved by using `via(mainEventBase_)`, but... # When remounting all the mounts on startup, we're running in the `mainEventBase_` thread so the simplistic solution to 1. would cause us to deadlock on startup (visible in the remount integration tests). So to avoid this, we shunt the completion of the future via a CPU pool. Also worth noting: the way we were setting up the global CPU pool with wangle wasn't correct; it takes a weak reference to the pool which was then getting destroyed when our prepare method returned. It just happened to work for us in the facebook specific build because something else was setting up a different CPU executor. I've reconciled this by just setting up a thread pool of our own and using that explicitly. Reviewed By: bolinfest Differential Revision: D5798659 fbshipit-source-id: f1c48730f283f6962f6cd706c02d82ea2952e369 |
||
---|---|---|
.. | ||
oss | ||
__init__.py | ||
client.py | ||
DEFS | ||
eden.thrift | ||
EdenError.cpp | ||
EdenError.h | ||
EdenServer.cpp | ||
EdenServer.h | ||
EdenServiceHandler.cpp | ||
EdenServiceHandler.h | ||
GlobNode.cpp | ||
GlobNode.h | ||
main.cpp | ||
PrettyPrinters.cpp | ||
PrettyPrinters.h | ||
streamingeden.thrift | ||
StreamingSubscriber.cpp | ||
StreamingSubscriber.h | ||
TARGETS | ||
ThriftUtil.h |