Commit Graph

67946 Commits

Author SHA1 Message Date
Xavier Deguillard
7f4cde5bf9 revisionstore: reduce default auto_sync_threshold
Summary:
One of the largest contributor to EdenFS memory usage are the internal
IndexedLog buffers to hold data in memory until a threshold is reached. Since
the main benefit of these buffers is to utilize the disk bandwidth, very large
buffers aren't necessary and much smaller ones will be able to achieve similar
results.

A default 50MB buffer is used which will cap the memory usage to 50MB * 3:
 - File IndexedLogDataStore
 - Tree IndexedLogDataStore
 - File LFS

The aux and history stores are also reduced down to 10MB.

Reviewed By: DurhamG

Differential Revision: D30948343

fbshipit-source-id: 74e789856ac995a5672b6aefe8a68c9580f69613
2021-09-16 15:52:57 -07:00
svcscm svcscm
7cfa286e80 Updating submodules
Summary:
GitHub commits:

f9d4807dd3
ca2b0f70fa
b97c53b629

Reviewed By: bigfootjon

fbshipit-source-id: 38f9f223007a320ccbd52ebfd000983f45be3606
2021-09-16 15:24:25 -07:00
Jan Mazur
479e662c65 set x-x2pagentd-ws-over-h1 when using x2pagentd with http proxy
Summary: As in the title

Reviewed By: ngoyal

Differential Revision: D30994761

fbshipit-source-id: d93af0d522dcfc8eb2be8f3984e90b75f309e1a9
2021-09-16 14:48:18 -07:00
svcscm svcscm
79700378a8 Updating submodules
Summary:
GitHub commits:

3034a2cca0
15425322e0
7c99cca266
0945c49960

Reviewed By: bigfootjon

fbshipit-source-id: 5f3ed5de781b99dd10bfb507aeac0c524f104744
2021-09-16 14:45:17 -07:00
Katie Mancini
41029bf3d7 unknown inodes are not a bug on NFS mounts.
Summary:
We periodically need to dereference inodes on NFS because we get no other info
from the kernel on when should dereference them.

This means the NFS kernel might have references to inodes after we delete them.

An unknown inode number is not a bug on NFS. It's just stale, so the error should
reflect that.

Reviewed By: xavierd

Differential Revision: D30144898

fbshipit-source-id: 3d448e94aea5acb02908ea443bcf3adae80eb975
2021-09-16 14:35:04 -07:00
Katie Mancini
7a1f3b6eb2 add a config knob to control how long to delay inode unloading
Summary:
We periodically need to dereference inodes on NFS because we get no other info
from the kernel on when should dereference them.

It can be disruptive to a users workflow because an open files that were rm'ed
or removed on checkout will no longer have their old content. (on a native
filesystem or fuse applications that had the file open propr to the removal
would still be able to access files.) For most editors this is not a problem
because they read the file on open (seems fine for vim and vscode from testing).
However folks could theoretically have a workflow this does not jive with.

Let's make it configurable how often this runs, so users can control how
much we distupt their workflow.

Reviewed By: xavierd

Differential Revision: D30144899

fbshipit-source-id: 59cf5faea70b3aea216ca2bcb45b96e34f5e72b5
2021-09-16 14:35:04 -07:00
Katie Mancini
ffa558bf84 implement inode unloading after checkout
Summary:
NFSv3 has no inode invalidation flow built into the procall. The kernel does not
send us forget messages like we get in FUSE. The kernel also does not send us
notifications when a file is closed. Thus EdenFS can not easily tell when
all handles to a file have been closed.

As is now we never clean up inodes. This is bad for memory & disk usage.
We will never unload an inode so we always keep it in memory once it's created.
Additonally, we never remove a materialized inode from the overlay. This means
we have unbounded memory and disk usage :/

We need to clean up these inodes at somepoint. There are a couple high level
options:
1. Support nfsv4. NFSv4 sends us close message when a file handle is closed.
This would allow us to actually keep track of reference coundts on an inode.
However, This is a lot of work. There is a lot of other things we would have to
support before we can move to nfsv4.
2. Run background inode cleanups.

nfsv4 is probably the right long term solution. But for now we should be able to
get by with periodic unloads.

I considered a couple of options for unloads:
1. Unload inodes immediatly when files are removed.
2. Delay cleaning up inodes until a while after they are removed. (i.e. clean
up inodes n seconds after an `unlink`, `rename`, `rmdir`, or checkout)
3. Run periodic inode unloading. (i.e. once a day unload inodes).

Option 1. feels a bit too hostile to applications that hold files open.
Option 3. means we will build up a lot of cruft over the course of the day. But is
probably the most application friendly.

I decided to try out option 2 first and see if it works well with the common
developer tools. Its seems to work (see below) so I am going with it.

This diff only does inode cleanup after checkout. we might want to run inode
clean up after unlink/remove dir as well, but this would be more expensive.
Batch unloading feels better on checkout seems better to me and should happen
frequently enough to clean up space for people.

There is one known "broken" behavior in this diff. We unload all unlinked
inodes which means we will erase more inodes than we should. Sometimes EdenFS
crashes or bugs and unlinks legit inodes. Normally we let those live in the
overlay so we could go in an recover them. My plan to fix this is to mark inodes
for unloading instead of just unloading all unlinked inodes.

Reviewed By: xavierd

Differential Revision: D30144901

fbshipit-source-id: 345d0c04aa386e9fb2bd40906d6f8c41569c1d05
2021-09-16 14:35:04 -07:00
svcscm svcscm
b8eee29acd Updating submodules
Summary:
GitHub commits:

92d4151e31
9af7e402ce
adda38ce8b
200578ad4c
2f87229263
aea6062c0f

Reviewed By: bigfootjon

fbshipit-source-id: c065d2766c8ebc6e5e63b67b97704379ff3ba518
2021-09-16 14:18:41 -07:00
Stanislau Hlebik
19d23c70cb mononoke: add a test that shows a weird behaviour of derive_manifest
Summary:
Delete a non-existing file is fine, and also deleting a file when a directory
with the same name just ignores the delete.

This diff adds tests to cover these cases. Overall it seems like a bug, but I'm
not sure it worth fixing - who knows if we have bonsai changesets that rely on
that!

Reviewed By: yancouto

Differential Revision: D30990826

fbshipit-source-id: b04992817469abe2fa82056c4fddac3689559855
2021-09-16 13:58:03 -07:00
Stanislau Hlebik
e4d2d8a0e4 mononoke: add new PathTree insert_and_merge method
Summary:
This method allows to append a value instead of just replacing it.

It will be used in the next diff when we derive manifest for a stack of commits
in one go.

Reviewed By: yancouto

Differential Revision: D30989889

fbshipit-source-id: dd9a574609b4d289c01d6eebcc6f5c76a973a96b
2021-09-16 13:58:03 -07:00
svcscm svcscm
3ee3cf9b9d Updating submodules
Summary:
GitHub commits:

9e26866b64
93fbb7e8e1
228bb046cc
5275915730
c0184bba0e
554e9739d1
43ec660cb1
eaeca03313
8afe8bb2ff

Reviewed By: bigfootjon

fbshipit-source-id: e7b3952bfebe9ade34ae2d01407cf53c7541fd53
2021-09-16 13:35:56 -07:00
svcscm svcscm
729f0cf9ff Updating submodules
Summary:
GitHub commits:

f342f4ae2d
9b6e1aaab8
7f0e5edd5b
b20d825454
8254e116de
8c840254b9
763c76bdfa
6a033433f5
70492a0cc9
57eea2b567

Reviewed By: bigfootjon

fbshipit-source-id: e89c4217be2a5c4a7499c54079a43c2f88019ac1
2021-09-16 13:06:07 -07:00
svcscm svcscm
1c3f87c72a Updating submodules
Summary:
GitHub commits:

366cd1ecd0
fcd261d3af
0f4627160d
e1db39d47f
4bd93f1d3b
dd32f3accf

Reviewed By: bigfootjon

fbshipit-source-id: 83b1b361cc63a2c7bd5383f0cb5fcb3e11f04802
2021-09-16 12:39:47 -07:00
Xavier Deguillard
1ebf805e18 inodes: return an eof flag from FileInode::read
Summary:
The NFS protocol needs to know if a read reached the end-of-file to avoid a
subsequent read and thus reduce the chattyness of the protocol.

On top of avoiding RPC calls, this should also halve the amount of data read
from Mercurial due to the BlobCache freeing the in-memory cached blob when the
FS has read the file in its entirety. This meant that the second READ would
always force the blob to be reloaded from the Mercurial store, which would also
force that blob to be kept in memory until being evicted (due to it not being
fully read).

Reviewed By: kmancini

Differential Revision: D30871422

fbshipit-source-id: 8acf4e21ea22b2dfd7f81d2fdd1b137a6e90cc8f
2021-09-16 10:34:36 -07:00
Robin Håkanson
b562bb0344 GitPool updates to handle heavy imports better.
Summary:
Changes:
- Limit simultainous open git-repo objects by amount of CPUs.
- Put a semaphore limit so we wait inside tokio::task domain instead of tokio::blocking domain (later is more expensive and has a hard upper limit).

Reviewed By: mitrandir77

Differential Revision: D30976034

fbshipit-source-id: 3432983b5650bac6aa5178d98d8fd241398aa682
2021-09-16 09:02:22 -07:00
Mateusz Kwapich
cfb0ec6085 make skiplists optional in mononoke
Summary:
This allows the mononoke_api user to choose whether the skiplists
should be used to spped up the ancestry checks or not.

The skiplists crate is already prepared for the situation where skiplist
entries are missing and traverses the graph then.

Reviewed By: yancouto

Differential Revision: D30958909

fbshipit-source-id: 7773487b78ac6641fa2a427c55f679b49f99ac8d
2021-09-16 07:20:01 -07:00
Mateusz Kwapich
515d178024 make WBC optional
Summary:
Allow the mononoke_api user to choose whether they want
oprerations to be sped up using WBC or not.

Reviewed By: yancouto

Differential Revision: D30958908

fbshipit-source-id: 038cf77735e7c655f6801d714762e316b6817df5
2021-09-16 07:20:01 -07:00
Mateusz Kwapich
b6f48e94a4 turn wbc into a trait and add noop implementation
Summary:
Some crates like mononoke_api depend on warm bookmark cache to speed up the
bookmark operations. This prevents them from being used in cases requiring
quick and low overhead startup like CLIs.

This diff makes it possible to swap out the warm bookmark cache to a
implementation that doesn't cache anything. (See next diffs to see how it's
used in mononoke_api crate).

Reviewed By: yancouto

Differential Revision: D30958910

fbshipit-source-id: 4d09367217a66f59539b566e48c8d271b8cc8c8e
2021-09-16 07:20:01 -07:00
Mateusz Kwapich
bc77707fdd remove get_all from warm bookmark cache
Summary:
This method was added before the more generic list method was added. Let's get
rid of it for simplicity and to discourage listing all the bookmarks.

Reviewed By: yancouto

Differential Revision: D30958911

fbshipit-source-id: f4518da3f34591c313657161f69af96d15482e6c
2021-09-16 07:20:01 -07:00
svcscm svcscm
f0bbefce6b Updating submodules
Summary:
GitHub commits:

a669f7e8b2
cc95f7c4ca
5c007dec0d
a96eaf564b
91fc1226f3

Reviewed By: bigfootjon

fbshipit-source-id: 826f347fb43ea0aa4b7fff2c5492f6a3058e378a
2021-09-16 02:09:10 -07:00
svcscm svcscm
f2aa0fd990 Updating submodules
Summary:
GitHub commits:

b7e48f4378
3f4f4a32a3
345137af18
e7225ed083
1269e00b44
f4a1d10668
57b42a4d66
3df18a2002
7f1dd90133

Reviewed By: bigfootjon

fbshipit-source-id: c8a59de3678a5ad0f1567826813e303bf23949e7
2021-09-15 23:47:47 -07:00
David Tolnay
7f0c6953b8 third-party/rust: Update pin-project 0.4.24 to 0.4.28
Summary:
0.4.24 is incompatible with crates that use `deny(warnings)` on a compiler 1.55.0 or newer.

Example error:

```
error: unused borrow that must be used
  --> common/rust/shed/futures_ext/src/stream/return_remainder.rs:22:1
   |
22 | #[pin_project]
   | ^^^^^^^^^^^^^^
   |
   = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
```

The release notes for 0.4.28 call out this issue. https://github.com/taiki-e/pin-project/releases/tag/v0.4.28

Reviewed By: krallin

Differential Revision: D30858380

fbshipit-source-id: 98e98bcb5a6b795b93ed1efd706a1711f15c57db
2021-09-15 23:01:30 -07:00
svcscm svcscm
5d1456c346 Updating submodules
Summary:
GitHub commits:

c14184ecf9
b9bb39e378
3d5e0a8c46
f8e98e9801
5d4bdb2468
b24b713061
913d715b23
f740358601
e601d8337a
dbdcdcdf0c

Reviewed By: bigfootjon

fbshipit-source-id: 154ef3f3d8363988190b8a0ceaa41a59c81a12d9
2021-09-15 21:19:09 -07:00
svcscm svcscm
d9c66772ea Updating submodules
Summary:
GitHub commits:

9e8b129df3
109a25c2fc
3bdfaee6aa
374ab54843
1adbb7bc6b
1afcc9bbbc
bd4d8cd275
35e40d16af
737192a219
2117e874bd
c54cf2358c

Reviewed By: bigfootjon

fbshipit-source-id: d8501ef1d6ae289372193fa654046d46897f7d46
2021-09-15 20:10:02 -07:00
svcscm svcscm
3604dc014b Updating submodules
Summary:
GitHub commits:

c4351343d6
9f0029072d
8b44dc36f1
1456b13dde
8a5684fdf0
4457942bfd
b51cdf5ca8
58b9dbf36c
3c1c77607a
60f13d9948
480026d75e
c1b85c2c35

Reviewed By: bigfootjon

fbshipit-source-id: 48c7b69b0fa338703772da2d2aaa19646a0845a8
2021-09-15 19:43:00 -07:00
svcscm svcscm
2ff76547f1 Updating submodules
Summary:
GitHub commits:

0ee04209c1
a9a7b9c728

Reviewed By: bigfootjon

fbshipit-source-id: e87004082c82b59150506e6b4fb7c544aa71ec14
2021-09-15 19:17:22 -07:00
svcscm svcscm
645d5ca266 Updating submodules
Summary:
GitHub commits:

7c744db9ad
cf9f171a36
8bfa553cfe
88a77777fe
03f0265ccf

Reviewed By: bigfootjon

fbshipit-source-id: 81bb68a622b95b22c7fc9863d8c8c234583f0204
2021-09-15 18:13:29 -07:00
Robert Grosse
acc7a511d3 Refactor matching optional lines in run-tests.py
Summary:
Move optional line handling logic into a separate function and simplify.

This diff is intended to be a pure refactoring with no observable changes in behavior. In particular, all the code dealing with the "optional" list appears to be dead code because if the line is optional, linematch will return "retry", so that branch is never reachable.

Reviewed By: DurhamG

Differential Revision: D30849757

fbshipit-source-id: 17283f9217466b3f85d913da66222b9a6779abe4
2021-09-15 17:47:22 -07:00
svcscm svcscm
b588ffad16 Updating submodules
Summary:
GitHub commits:

f652015098
4a5d933c17
2526d47585
b90f30c390

Reviewed By: bigfootjon

fbshipit-source-id: dcfa2c7fc8e5caffcdc3af719e92c32e6eb8347c
2021-09-15 17:44:28 -07:00
svcscm svcscm
63c61a28e0 Updating submodules
Summary:
GitHub commits:

b2345d5083
2819c7840e

Reviewed By: bigfootjon

fbshipit-source-id: 2720b3c31e46e3e7601b99d406fd99979b3bc3f0
2021-09-15 17:41:36 -07:00
Jeremy Fitzhardinge
113060beb1 third-party/rust: bump all the tracing packages
Summary:
This includes recent changes:
- `skip_all` in #[instrument] https://github.com/tokio-rs/tracing/pull/1548
- NoSubscriber no-op Subscriber https://github.com/tokio-rs/tracing/pull/1549
- Box/Arc Layer (https://github.com/tokio-rs/tracing/pull/1536 +
  https://github.com/tokio-rs/tracing/pull/1547)
- log filtering fixes https://github.com/tokio-rs/tracing/pull/1543

Local: force `log` and `log-always` features off. This removes the
`enable-trace-logging` flag from smartplatform/reconciler.

Reviewed By: guswynn

Differential Revision: D30906032

fbshipit-source-id: fdc3e4e29a39e9e181d9f4ff017e6b3e16acdcd8
2021-09-15 16:52:25 -07:00
Durham Goode
133aca0fb4 status: remove serial manifest read
Summary:
This line was iterating over a list of files and looking in the
manifest for each one. This results in serial manifest reads which can result in
serial network requests.

Let's instead use manifest.matches() to test them all at once via the underlying
BFS, which does bulk fetching.

Differential Revision: D30938359

fbshipit-source-id: 1af7d417288b82efdd537a4afeaf93c1b55eaf49
2021-09-15 12:36:44 -07:00
svcscm svcscm
58f833e167 Updating submodules
Summary:
GitHub commits:

888c86755f
964608719b
b04ea4950a
8dd313f24c

Reviewed By: bigfootjon

fbshipit-source-id: a485dee3f5399e5d76c6ba524fd90430e258563c
2021-09-15 12:13:20 -07:00
svcscm svcscm
86c0917254 Updating submodules
Summary:
GitHub commits:

6f3b5a1603
e2bf1385ed
f7de5fdccc
9e15eae327
fcce112885
ffe2d88dda
a622f870ed

Reviewed By: bigfootjon

fbshipit-source-id: 3ffaa8f8c9700e83b052743e0df3984b74e54d97
2021-09-15 11:40:45 -07:00
svcscm svcscm
aab7d21eed Updating submodules
Summary:
GitHub commits:

e342258b53
26d778112c
68c54be989
21f75efaa2
f1d50c09cb
ec3b9a098f
9d8836abbb
1bd0a0bf0c
a0d45cd250

Reviewed By: bigfootjon

fbshipit-source-id: 9b36985999e0248158234959ff903a580e15aa06
2021-09-15 11:18:47 -07:00
Jun Wu
e8c2ac87ce dag: demonstrate bugs in vertex to path resolution
Summary:
Demonstrate issues with the vertex to path resolution. Basically, the vertex to
path resolution logic did not check if the "parent of merge" being used is
actually valid (is an ancestor of provided heads) or not.

Reviewed By: DurhamG

Differential Revision: D30911150

fbshipit-source-id: 83d215910d5ba67ac0d5749927018a7aefcc6730
2021-09-15 11:16:25 -07:00
svcscm svcscm
d0cb5f7fc9 Updating submodules
Summary:
GitHub commits:

9abf19ef01
e093192088
73b5bcdebc
86a7cee8b3
9358207a98
4449a3e20c
e3784b830f
85ab490893
57581d71b2
aed49de444

Reviewed By: bigfootjon

fbshipit-source-id: 42817c5db4d5816e8ab7e622d80c36316068070e
2021-09-15 10:49:31 -07:00
svcscm svcscm
e26566031e Updating submodules
Summary:
GitHub commits:

b258ee3186
cd4a4a8427

Reviewed By: bigfootjon

fbshipit-source-id: 5234f36cba18a4b9efe9e08d8ee3b27e589dca81
2021-09-15 10:14:11 -07:00
Arun Kulshreshtha
462e0d0386 edenapi: fix dead code warnings
Summary: Delete dead code.

Reviewed By: yancouto

Differential Revision: D30942023

fbshipit-source-id: 9831c5eec6869c692fc13354dd6368fc6fb5ce8a
2021-09-15 06:43:14 -07:00
svcscm svcscm
e88391aa0b Updating submodules
Summary:
GitHub commits:

be2cd371dc
f5b83cfc00
4e1afbb852
4cb5bcb50d
635dc4c248

Reviewed By: bigfootjon

fbshipit-source-id: 3729a8a22424687088d2bb3de3a48baff8ccc4fe
2021-09-15 04:32:23 -07:00
svcscm svcscm
e74e264bce Updating submodules
Summary:
GitHub commits:

b3c7050648

Reviewed By: bigfootjon

fbshipit-source-id: 2d06234508aecc275900447235f6489f24bc88ae
2021-09-15 03:56:46 -07:00
CodemodService Bot
3562c65696 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D30955790

fbshipit-source-id: 45a00d6e8c683b0a1b34ef7041197e9ae30cf63a
2021-09-15 01:29:47 -07:00
svcscm svcscm
aad1cfdca5 Updating submodules
Summary:
GitHub commits:

01b48d5e4f
dd86459192
e0c5e3f646
008120ae03

Reviewed By: bigfootjon

fbshipit-source-id: 40fe1e76e226336ee7bc1528715aaaf36a0fe159
2021-09-14 23:34:58 -07:00
svcscm svcscm
49e53e0907 Updating submodules
Summary:
GitHub commits:

9053597166

Reviewed By: bigfootjon

fbshipit-source-id: 2884cae571831433d77349d490017dcbb5df5c01
2021-09-14 22:40:37 -07:00
svcscm svcscm
582b0bf29c Updating submodules
Summary:
GitHub commits:

9e300f5907
b83d8b3606
545ef3201b
030867b1b7
b2f8c22743

Reviewed By: bigfootjon

fbshipit-source-id: 06b3360206e700aec641826e85e07aa7e8524e37
2021-09-14 21:29:47 -07:00
svcscm svcscm
a39c93e8a2 Updating submodules
Summary:
GitHub commits:

d3292d2ff7
e06f9d42a7
757d64a96c

Reviewed By: bigfootjon

fbshipit-source-id: dd4dad37cf0c38d48c2e75894ba69e14d0e0978d
2021-09-14 20:56:30 -07:00
Andrey Chursin
008167cb0e deprecate scs proxy hash
Summary:
The tree metadata fetching evolution goes as follow
(1) (commit, path) scs query
(2) tree manifest scs query [we are here]
(3) eden api manifest query [in development]

Option (1) is no longer used and is the only placed that required scs proxy hash.
Removing it will simplify transition from (2) to (3) and also cleans up bunch of unused code.

It also comes with minor performance improvement, saving about 5% on file access time.
To be precise, this is measured by running fsprobe [this is probably too little to measure in high noise benchmark like running arc focus]:
```
fsprobe.sh run cat.targets --parallel 24
```

Results:
```
W/ scshash:
P24: 0.1044 0.1007 0.1005 (hot) 0.1019 avg

W/o scshash:
P24: 0.0954 0.0964 0.1008 (hot) 0.0975 avg
```

This performance improvement comes from the fact, that even though scs hash was never created or used, we still attempted to load it from scs table, and even though this load always failed it contributed to execution time.

Reviewed By: xavierd

Differential Revision: D30942663

fbshipit-source-id: af84f1e5658e7d8d9fb6853cbb88f02b49cd050b
2021-09-14 19:52:15 -07:00
Andrey Chursin
a34c530606 fsprobe: change latency precision .2 -> .4
Summary: File access latency can actually be less then 1 ms, so it's good to show more digits

Reviewed By: DurhamG

Differential Revision: D30942905

fbshipit-source-id: 2fc8d48dbc08c55b89d829d1474ae11c2c3df1c3
2021-09-14 19:52:15 -07:00
Andrey Chursin
f3cba474a3 fsprobe: add simple shell script to generate and run fsprobe tests
Summary:
Since fsprobe itself requires a 'plan' to run, we need separate script to standartize list of plans we think are relevant
This scripts allows to generate fsprobe plans and run them

Reviewed By: DurhamG

Differential Revision: D30908892

fbshipit-source-id: eb722fe1f6d982e42b66614f08bc73345e04f9e6
2021-09-14 19:52:15 -07:00
svcscm svcscm
38c58d4053 Updating submodules
Summary:
GitHub commits:

45c6e196bd
fdd914d38f
249d4257bc
7a811e0eaf

Reviewed By: bigfootjon

fbshipit-source-id: fadc497cc2d539f4323f4a3a58f9484514ab6ec2
2021-09-14 18:39:39 -07:00