sapling/eden/fs
Chad Austin 75bd0c08ea remove future.get() call from FileInode::ensureDataLoaded
Summary:
With the subsequent diff that enables multiple concurrent
hg importers, I was seeing this deadlock during rebase; each of
the worker threads was being blocked until it saturated the various
thread pools and locked up the server.

This removes the blocking call and replaces it with a SharedPromise
to allow multiple callers to wait for the load.

Note that this changes the semantics of ensureDataLoaded slightly:
previously the blob load was synchronous while the write lock was
held.  Now we release the write lock until the load completes.

I've added some post-condition checks to validate that we don't
break any state.  I believe that our usage is such that we don't
do anything that might mess things up.  Am I missing anything?

Reviewed By: simpkins

Differential Revision: D6264900

fbshipit-source-id: 4aa2870d95f0f0ec48d87299978cb87af99e3969
2017-11-10 13:24:33 -08:00
..
config run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
fuse run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
inodes remove future.get() call from FileInode::ensureDataLoaded 2017-11-10 13:24:33 -08:00
journal run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
model run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
rocksdb run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
service tweak log levels for thrift calls 2017-11-10 11:15:27 -08:00
store run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
testharness Store Hg dirstate data in Hg instead of Eden. 2017-11-06 19:56:49 -08:00
utils run clang-format across all C++ files 2017-11-03 16:02:03 -07:00