sapling/eden
Chad Austin 0c8f577cd8 close FileInode file handle when there are no open file handles
Summary:
In some workloads we're seeing folks run out of file descriptors.
We forgot that we'd taken out the code that closes the underlying fds.
This diff takes a run at adding a simple counter of the open file handle
objects that is incremented when they are constructed and decremented
when they are destroyed.

When the count falls to zero we release the file handle.

Note that we unconditionally open files when we first load the inodes
from the overlay.  I tried to defer that open attempt and it broke
the timestamp overlay test.  I think we can revisit that aspect in
a follow on diff; for now we should be more resilient to transiently
opened files from things like ripgrep or similar.

Reviewed By: simpkins

Differential Revision: D6097090

fbshipit-source-id: 9a48220002e760fb1ffb8d7e2a68fa7036558b78
2017-11-21 09:21:29 -08:00
..
cli add a --takeover flag to allow graceful takeover 2017-11-20 11:35:49 -08:00
docs update logging statements to use folly logging APIs 2017-06-22 13:50:13 -07:00
facebook Run the autodeps script on our build files. 2017-11-14 11:18:19 -08:00
fs close FileInode file handle when there are no open file handles 2017-11-21 09:21:29 -08:00
hooks forcibly disable the fbsparse extension 2017-11-14 20:07:15 -08:00
integration New condition for test_update_with_untracked_file_that_is_tracked_in_destination. 2017-11-20 15:56:35 -08:00
py support reading the old .hg/dirstate format 2017-11-07 14:17:37 -08:00
scripts add a script to force unmounting all edenfs mounts 2017-11-15 11:48:38 -08:00
DEFS move eden/fs/cli to eden/cli 2017-04-14 11:39:01 -07:00