sapling/eden/fs/service
Wez Furlong fab0c4071c centralize the post-mount functionality
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
2017-09-13 08:42:21 -07:00
..
oss add an EdenServer::getMainEventBase() method 2017-08-31 19:05:23 -07:00
__init__.py Add integration test for rebasing in Hg. 2017-07-27 17:24:01 -07:00
client.py use .eden/socket in hg extensions 2017-04-06 10:52:06 -07:00
DEFS avoid multiple builds of the eden server library 2017-04-14 11:39:02 -07:00
eden.thrift Introduce a special NoValueForKeyError for hgGetDirstateTuple() and hgCopyMapGet(). 2017-09-11 10:52:09 -07:00
EdenError.cpp update all copyright statements to "2016-present" 2017-01-20 22:03:02 -08:00
EdenError.h update all copyright statements to "2016-present" 2017-01-20 22:03:02 -08:00
EdenServer.cpp centralize the post-mount functionality 2017-09-13 08:42:21 -07:00
EdenServer.h centralize the post-mount functionality 2017-09-13 08:42:21 -07:00
EdenServiceHandler.cpp centralize the post-mount functionality 2017-09-13 08:42:21 -07:00
EdenServiceHandler.h EdenServiceHandler::mountImpl returns a Future 2017-09-06 13:04:54 -07:00
GlobNode.cpp fix crashes triggered by the new TreeInode::Entry checks 2017-07-26 13:21:13 -07:00
GlobNode.h move eden/utils and eden/fuse into eden/fs 2017-04-14 11:39:02 -07:00
main.cpp re-organize the fuse Channel and Session code 2017-09-08 19:25:34 -07:00
PrettyPrinters.cpp implement "hg status" using EdenMount::diff() 2017-03-30 21:35:00 -07:00
PrettyPrinters.h implement "hg status" using EdenMount::diff() 2017-03-30 21:35:00 -07:00
streamingeden.thrift implement eden->watchman subscriptions 2017-03-21 13:35:20 -07:00
StreamingSubscriber.cpp update logging statements to use folly logging APIs 2017-06-22 13:50:13 -07:00
StreamingSubscriber.h implement eden->watchman subscriptions 2017-03-21 13:35:20 -07:00
TARGETS Kill folly/experimental:experimental 2017-09-03 14:24:26 -07:00
ThriftUtil.h update the checkOutRevision() API to accept a BinaryHash 2017-04-06 17:50:43 -07:00