sapling/CMake
Thomas Orozco de525e8fe4 edenfsctl: take a lock around mutating config.json
Summary:
There is a race in here. We read the config, then mutate it, then put the new
config in place. However, if something else comes and mutates the config
between the time where we read it and write it again, we'll clobber its
changes.

Concretely, if you're running lots of `eden clone` or `eden rm` concurrently,
then the current mechanism will sometimes "forget" some directories or add back
directories you removed, which will e.g. break `eden list` (and cause those
commands to sometimes fail as well).

This diff fixes that by wrapping the critical section with a file lock.

Reviewed By: chadaustin, xavierd

Differential Revision: D32251727

fbshipit-source-id: 9eee57c7a824286bb4f0e7911e5ccd9d769c6daa
2021-11-11 00:50:32 -08:00
..
eden-config.cpp.in update build configuration information for Python and C++ 2020-04-22 12:48:47 -07:00
eden-config.h.in add an EDEN_HAVE_USAGE_SERVICE config macro 2021-09-08 19:50:44 -07:00
eden-config.py.in nfs: run most integration tests on edenfs 2021-04-23 13:30:17 -07:00
EdenCompilerSettings.cmake oss: compile with -Wno-nullability-completeness 2021-04-19 15:08:22 -07:00
EdenConfigChecks.cmake edenfsctl: take a lock around mutating config.json 2021-11-11 00:50:32 -08:00
FindLibGit2.cmake make support for Git optional 2019-09-20 18:22:04 -07:00
FindLZ4.cmake cmake: always build support for the EdenSCM backing store 2019-11-22 13:00:07 -08:00
FindPrjfs.cmake eden: adjust projectedfs SDK dep search procedure 2019-08-28 06:49:30 -07:00
FindSELinux.cmake update license headers in CMake files 2019-06-19 17:02:46 -07:00
FindSqlite3.cmake update license headers in CMake files 2019-06-19 17:02:46 -07:00
RustStaticLibrary.cmake Enable fb dynamicconfig loading inside eden backingstore 2021-07-06 13:53:41 -07:00