sapling/eden/fs/service
Stanislau Hlebik 14527beaf4 add ObjectFetchContext with causeDetail field
Summary:
As previous diffs in the stack show there were at least one place in the
codebase which used incorrect object context logger and that resulted in "blind
spots" in undesired file fetches logging i.e. undesired file fetches were
logged, but neither pid nor cmd-line was logged.

There are quite a few places in the codebase that use null
object fetch context, and threading the correct object fetch context to all of
them might be hard. Threading the context is a bit annoying, so it would be good to know something like "EdenDispatcher code is responsible for most of the blind spots, so let's thread the correct context there first". Or it would be equally good to know that none of the null object context are responsible for blind spots.

This diff might help us decide where we need to thread real object fetch context
first. Instead of passing null object fetch context let's pass null object
fetch context with causeDetail field. This field will be logged to scuba (see
BackingStoreLogger::logImport code), and instead of getting "Unknown" interface
we'll get e.g. "Unknown - EdenDispatcher::create", and that would highlight
where we need to thread the context.

A note about implementation - getNullContextWithCauseDetail returns a raw pointer
which is expected to be static i.e. it should work similarly to current
getNullContext implementation. It's quite a hack, but allows us to get rid of
memory allocations (we'd have one memory allocation per place in the code where
getNullContextWithCauseDetail). Let me know if you are ok with this hack.

Reviewed By: kmancini

Differential Revision: D23422526

fbshipit-source-id: e576bba9fc09e160fc42771c7589cdd1694d93c0
2020-09-01 03:39:18 -07:00
..
oss split runEdenMain out from EdenMain 2020-03-26 16:19:25 -07:00
test utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
.gitignore watchman: pull in thrift in the oss build for eden support 2019-02-04 21:37:47 -08:00
CMakeLists.txt unify the EdenMain code on Windows 2020-05-28 09:01:03 -07:00
eden.thrift eden prefetch record-profile and eden prefetch finish-profile 2020-08-04 06:50:45 -07:00
EdenCPUThreadPool.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
EdenCPUThreadPool.h Tidy up license headers 2019-10-11 05:28:23 -07:00
EdenError.cpp add EdenErrorType to EdenError 2019-10-29 09:23:03 -07:00
EdenError.h Remove thrift setters 2020-07-13 14:30:00 -07:00
EdenInit.cpp move UserInfo to eden/fs/utils/ 2020-04-29 17:21:12 -07:00
EdenInit.h add a new process to monitor EdenFS 2020-01-31 13:22:26 -08:00
EdenMain.cpp introduce metadata importer 2020-07-10 16:03:32 -07:00
EdenMain.h introduce metadata importer 2020-07-10 16:03:32 -07:00
EdenServer.cpp run edenfsctl redirect fixup after mout is done 2020-08-24 21:38:12 -07:00
EdenServer.h don't print fsck progress bars when fsck does not happen 2020-08-05 18:27:34 -07:00
EdenServiceHandler.cpp add ObjectFetchContext with causeDetail field 2020-09-01 03:39:18 -07:00
EdenServiceHandler.h eden prefetch record-profile and eden prefetch finish-profile 2020-08-04 06:50:45 -07:00
EdenStateDir.cpp fix issues when checking EdenFS status on windows 2020-04-15 15:46:24 -07:00
EdenStateDir.h exit if the EdenFS lock file ever becomes invalid 2020-03-26 20:17:12 -07:00
fb-edenfs@.service set OOMScoreAdjust to -20 in systemd unit 2019-10-02 12:53:28 -07:00
PeriodicTask.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
PeriodicTask.h Tidy up license headers 2019-10-11 05:28:23 -07:00
PrettyPrinters.cpp Migrate to field_ref Thrift API 2020-07-21 11:23:35 -07:00
PrettyPrinters.h Tidy up license headers 2019-10-11 05:28:23 -07:00
StartupLogger.cpp unify the StartupLogger code on Windows and POSIX 2020-04-30 23:36:49 -07:00
StartupLogger.h use logVerbose for fsck bars 2020-07-30 08:47:54 -07:00
streamingeden.thrift enable py3 thrift language 2020-06-10 19:29:17 -07:00
Systemd.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
Systemd.h Tidy up license headers 2019-10-11 05:28:23 -07:00
ThriftPermissionChecker.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
ThriftPermissionChecker.h Tidy up license headers 2019-10-11 05:28:23 -07:00
ThriftUtil.h add EdenErrorType to EdenError 2019-10-29 09:23:03 -07:00