Summary: If the user specifies a mount, only clear for that mount, otherwise clear for all mounts.
Reviewed By: fanzeyi
Differential Revision: D22674210
fbshipit-source-id: 832c4fd37a63fdb44cb12844378b61d113731016
Summary: add a thrift call to clear `pidFetchCount_` in `ObjectStore` and call it in `eden debug gc_process_fetch`. Users might want this command to start a new recording of process fetch counts.
Reviewed By: kmancini
Differential Revision: D22583430
fbshipit-source-id: eba7d63b08da5134fd09b7512895aba06f6a7ca5
Summary:
We are unifying C++ APIs for accessing optional and unqualified fields:
https://fb.workplace.com/groups/1730279463893632/permalink/2541675446087359/.
This diff migrates code from accessing data members generated from unqualified
Thrift fields directly to the `field_ref` API, i.e. replacing
```
thrift_obj.field
```
with
```
*thrift_obj.field_ref()
```
The `_ref` suffixes will be removed in the future once data members are private
and names can be reclaimed.
The output of this codemod has been reviewed in D20039637.
The new API is documented in
https://our.intern.facebook.com/intern/wiki/Thrift/FieldAccess/.
drop-conflicts
Reviewed By: yfeldblum
Differential Revision: D22631599
fbshipit-source-id: 9bfcaeb636f34a32fd871c7cd6a2db4a7ace30bf
Summary:
This diff updates `getAccessCounts` to
- obtain the PID-fetchCount map data added in the previous diff
- put that data into its `result`
Reviewed By: kmancini
Differential Revision: D22101232
fbshipit-source-id: 1d41715339d418b03c17f6c93a7a497b432973ae
Summary: This diff makes `InodeBase::stat()` to be able to accept `ObjectFetchContext` as a parameter.
Reviewed By: chadaustin
Differential Revision: D21780883
fbshipit-source-id: 9b1db2e2268cb98663bcf902ea61897da593ea05
Summary: This diff passes a callback function `progressCallback` from `EdenServer` to make `OverlayChekcer` print fsck messages to stdout.
Reviewed By: fanzeyi
Differential Revision: D21966060
fbshipit-source-id: 317b2c8954c718b51b5295c9f8d7698eb203906e
Summary:
Some Thrift clients require that values of type `string` must contain
valid UTF-8, and fail to decode otherwise. Ensure that EdenError's
message is always valid UTF-8.
Reviewed By: fanzeyi
Differential Revision: D21890761
fbshipit-source-id: 93b554e0bc6648c685f5fa54612576bd95d95ae5
Summary: This diff fixes `'__isset' is deprecated` problem when building `//eden/fs/service:edenfs`
Reviewed By: simpkins
Differential Revision: D21966922
fbshipit-source-id: c3b12134f3f84db0a97f3975dae5d64a2c98641a
Summary:
Thrift setter API is deprecated since it doesn't bring any value over direct assignment. Removing it can reduce build-time and make our codebase more consistent.
If result of `s.set_foo(bar)` is unused, this diff replaces
s.set_foo(bar);
with
s.foo_ref() = bar;
Otherwise, it replaces
s.set_foo(bar)
with
s.foo_ref().emplace(bar)
Reviewed By: chadaustin
Differential Revision: D21712029
fbshipit-source-id: 3a332b4bf6fac6b3cf396d34e6d5ca4849181a6d
Summary:
- Added uptime field to DaemonInfo thrift struct
- Created startTime member variable in EdenServer
- Made appropriate refactoring changes to EdenMain and EdenServer
- Changed main.py and util.py to use the new uptime value
Reviewed By: genevievehelsel
Differential Revision: D21471140
fbshipit-source-id: 8868de667dfb95de93e3e71b90c0412fb3825388
Summary:
All of these were simply NOT_IMPLEMENTED on Windows, but the code compiles
and doesn't break any existing tests. The underlying called functions might
have been implemented already, or are NOT_IMPLEMENTED, either way, this reduces
the amount of `#ifdef _WIN32`.
Reviewed By: chadaustin
Differential Revision: D21405622
fbshipit-source-id: bdc2de41d6a57e1c0b532e76eeb2c0c86180d558
Summary:
The operation originally wanted to operate on the fuse `Attr`
structure which we don't have on Windows, so I repurposed the
`InodeBase::getattr` into `InodeBase::stat` and moved the conversion
of `struct stat` to `Dispatcher::Attr` to the `EdenDispatcher::getattr`
method (and a couple of other adhoc places that were doing a similar
conversion).
Reviewed By: chadaustin
Differential Revision: D20562459
fbshipit-source-id: 6b538110038352e9b5590fcb5ff5c33fe84ac1d8
Summary:
It turns out that macOS, FreeBSD, and Linux all agree on the values
for dtype. If we assume dtype is just the high nibble of mode_t
shifted right by 12, then the Windows CRT agrees too. So hardcode the
values in eden.thrift and add appropriate static_asserts. This opens
the possibility of simply static_cast'ing the numeric values in
Watchman.
Reviewed By: simpkins
Differential Revision: D20975101
fbshipit-source-id: 354ffcbdf3f1d5f8b1715abf1026eaea429d16cf
Summary:
enums and i16 are not serialization-compatible in Thrift, but we want
an enumeration with defined values for dtypes. Rename the existing
Dtype type to OsDtype in preparation for introducing the Dtype enum.
Reviewed By: simpkins
Differential Revision: D20974559
fbshipit-source-id: 5d9087a79e7fd59b99b257a99351a8287ba00b5f
Summary:
Add a getEntryInformation Thrift call that allows looking up existence
and dtype without fetching blobs. There is still plenty of room for
improving this - we don't need to allocate inodes for every path to
satisfy this query.
Reviewed By: genevievehelsel
Differential Revision: D20974514
fbshipit-source-id: e7fe5b6bd789aaadbb8295c3d69099cb2f17debd
Summary:
Add variants of the helpers that return by value rather
than by reference so that we can use those on Windows (which
doesn't embed a `timespec` in a `struct stat`).
Reviewed By: simpkins
Differential Revision: D20562242
fbshipit-source-id: e4769fccb40229765bbf99d0967708cc864db6c3
Summary:
This enables globFiles for Windows, with some
minor tweaks around dtype to enable the build and make
the results consistent between watchman and eden.
Reviewed By: chadaustin
Differential Revision: D20536715
fbshipit-source-id: b1c8184dc664910e4d052a21b4cd993ddfaadf25
Summary:
This is ostensibly removing and ifndef to enable watchman
to successfully query the journal.
However, for this to work we need to teach the mountPoints list about
normalizing file names.
We avoid using realpath on posix systems because we absolutely cannot afford to
make VFS calls back to ourselves. I don't know if the same applies on Windows.
If not then perhaps the right thing to do here is to use something like
GetFinalPathNameW to canonicalize the paths.
For now, this does the dumb thing and lowercases and converts slashes.
With this change, watchman is able to subscribe to eden and query
journal information.
However, since most queries get translated to glob requests it
still isn't useful; need to enable globFiles in a follow up diff.
Reviewed By: pkaush
Differential Revision: D20516737
fbshipit-source-id: 2053d7b565a40f6ae9cc738386e37d737772e91e
Summary: This diff enables running source control update and rebase operations on Eden Windows clones.
Reviewed By: wez
Differential Revision: D20480873
fbshipit-source-id: 9e7cd6acdd9aedc87ddfe126718f48509d1d7c4f
Summary:
Instead of manually enumerating every method defined in eden.thrift to
enable histogram statistics, use Thrift's own metadata.
Reviewed By: genevievehelsel
Differential Revision: D20929642
fbshipit-source-id: 5a54eb03e75fcd08cf653e2c53a78c8137ba9553
Summary: Now that fb303's Thrift function histogram support is open sourced, remove the _WIN32 ifdefs.
Reviewed By: simpkins
Differential Revision: D20907360
fbshipit-source-id: bb72dda0c801ca1bba4866d26645148881630596
Summary:
Using `setOption("logging", config)` is the preferred way to update the
logging configuration. This older API is no longer needed, and I don't
believe anything should be using it any more.
Reviewed By: genevievehelsel
Differential Revision: D20876083
fbshipit-source-id: c0b40c61535bee2363f273345cbce818389de6b7
Summary:
Migration from Future-returning executor-erasing collectX forms to
SemiFuture-returning forms, that are less risky in particular with coroutines.
Earlier changes added collectXSemiFuture and collectXUnsafe as a migration
path. We then migrated collectX callsites to collectXSemiFuture or
collectXUnsafe and switched the implementation of collectX to the SemiFuture
form.
This diff renames uses of collectXSemiFuture to collectX, as the two are
identical.
Reviewed By: simpkins
Differential Revision: D20833464
fbshipit-source-id: c14aa40f8cce121632ff922300ef271721c1d695
Summary:
The _NAME_TO_VALUES and _VALUES_TO_NAMES fields are almost deprecated,
so instead use TEnumTraits.
Reviewed By: simpkins
Differential Revision: D20708754
fbshipit-source-id: 2a5107ee1299b4160f38ca6cddf90416745f6141
Summary:
I'm about to add another reference to our service name, so instead of
hardcoding "Eden", add a kServiceName constant. While I'm at it, I
renamed it to EdenFS.
Reviewed By: genevievehelsel
Differential Revision: D20500668
fbshipit-source-id: 4974363156ba2934a1a5cd86d9e8fd7e93d89181
Summary:
Instead of explicitly running results on the Thrift thread manager
executor, use the semifuture implementation of the Thrift method which
does the same thing automatically.
Reviewed By: fanzeyi
Differential Revision: D20481540
fbshipit-source-id: 5f23c0193514fce20d80e3292bfa7402f4448e38
Summary:
Migration from Future-returning executor-erasing collectX forms to
SemiFuture-returning forms, that are less risky in particular with coroutines.
Earlier diffs added SemiFuture and Unsafe versions. This codemod migrates
collect versions to the Unsafe versions to allow the basic collect versions to
be made safe.
Reviewed By: simpkins
Differential Revision: D20331206
fbshipit-source-id: efc8dff487d45f7d53ee55e8c4696bd3eed0e6da
Summary:
Update the thrift `getDaemonInfo()` call to also return the fb303 status.
This allows the CLI to make a single thrift call instead of 2 when checking if
the EdenFS daemon is healthy.
Reviewed By: genevievehelsel
Differential Revision: D20130406
fbshipit-source-id: 9d25341e1d5f82fb1a921e1d7b1ebd34bcf19dc8
Summary:
Add a fetch context interface to ObjectStore that allows tracing cache
hits, backing store fetches, and fetch durations in the context of a
diff or checkout operation.
Reviewed By: simpkins
Differential Revision: D19135625
fbshipit-source-id: d0d8f134b1c89f7ba4971a404a46a69a1704ba5c
Summary:
D19135344 broke EdenFS's cmake builds, and our macOS releases haven't
been going out. Rather than pass the same streaming options to the
Thrift compiler in the CMake build, remove deprecated_server_streams
from both builds.
Reviewed By: simpkins
Differential Revision: D19204397
fbshipit-source-id: c22e634ded82a683daff5c92182c8a1eb1ed4d21
Summary:
EdenMount offered both getRootTree and getRootTreeFuture. Replace the
former with the latter and adjust remaining callers.
Reviewed By: genevievehelsel
Differential Revision: D18666585
fbshipit-source-id: 961361a1fb545e48db0ece970bb5e6ffbca8efef
Summary:
The last remaining user of ObjectStore::getBlobMetadata was a debug
Thrift call. Remove it and update the Thrift call to use getBlobSize
and getBlobSha1.
Reviewed By: pkaush
Differential Revision: D18663376
fbshipit-source-id: 86baefc9004a07aac4ddf5849870431be04c75f2
Summary:
D18820280 increased the log level for `globFiles()` calls from DBG3 to DBG2.
However, buck and other tools often end up huge numbers of glob calls, and
this ends up causing log spam.
This change reduces the log level of `globFiles()` back to DBG3. In a
subsequent diff I will update the code to increase the log level for slow
calls. This does mean that we will only get a log message for slow glob calls
after the call completes, but this is better than not getting a message at
all.
Reviewed By: pkaush
Differential Revision: D18924780
fbshipit-source-id: 86e83614f51424aca078e4de8a56c45018a6d286
Summary: Enabling getScmStatusBetweenRevisions to work on Windows and its tests.
Reviewed By: simpkins
Differential Revision: D18431271
fbshipit-source-id: eee82538e2fc3d7e371c96fc271cd9662ea6d737
Summary:
A successful run of hg commit ends in call to resetParents() to reset the current parent commit.
We also need resetParent to run the Status tests.
Reviewed By: genevievehelsel
Differential Revision: D18439954
fbshipit-source-id: 44f7a009e050bd5e2130d8c4fc3a85a8ec3bfad1
Summary:
Increase the log level for messages about `globFiles()` thrift calls so that
they are enabled by default in our normal production configuration.
`globFiles()` calls can potentially cause EdenFS to fetch a lot of data, so it
is useful to be able to see them in the logs when investigating performance
issues.
Reviewed By: genevievehelsel
Differential Revision: D18820280
fbshipit-source-id: e351a9541e420f5eb47ca14d6620366437773ce4
Summary:
This splits `EDEN_BUG()` into three separate version. All three crash in
debug mode builds, but in release builds they behave differently:
- `EDEN_BUG()` throws an exception
- `EDEN_BUG_FUTURE(Type)` returns a `folly::Future<Type>` that has been
fulfilled with an exception.
- `EDEN_BUG_EXCEPTION()` returns a `folly::exception_wrapper`.
The main advantage of this is that this allows the compiler to detect that
`EDEN_BUG()` can never return. Previously `EDEN_BUG()` was used for all 3 of
these different cases, and its behavior depended on whether `toException()`
was ever called. As a result we could not easily get the compiler to identify
code paths where we know at compile time that it will never return.
Reviewed By: chadaustin
Differential Revision: D18652103
fbshipit-source-id: 070107c7520f51b05696905fa243de5f8df15958
Summary:
We're about to return more information from checkout, so
introduce a CheckoutResult struct.
Reviewed By: genevievehelsel
Differential Revision: D18630820
fbshipit-source-id: 78b68ef3551ca8c9e9968631de554084c333b4b9
Summary: make `future_getScmStatusV2` into `async_tm_getScmStatusV2` so we can short circut the status call if the request is no longer active.
Reviewed By: simpkins
Differential Revision: D18378212
fbshipit-source-id: b2bca014a37d99f7a92478c3e23bde0b874dd13c
Summary: This reads `enforceParents` from a config instead of always assuming true for `getScmStatusV2()`. This will allow a easy kill switch in case throwing errors from this thrift call causes issues with something that calls hg status
Reviewed By: simpkins
Differential Revision: D18258164
fbshipit-source-id: 1ae421a941c01a678d25d5453c771262b03558d0