Commit Graph

65553 Commits

Author SHA1 Message Date
Xavier Deguillard
189934f9ac utils: allow mutable lambda to be passed to ImmediateFuture::thenValue
Summary:
Since lambda are default capturing by const, Func was also captured that way,
which made it impossible to call if Func was actually a mutable lambda.

Reviewed By: chadaustin

Differential Revision: D28297423

fbshipit-source-id: b9c6bdcf024c2e219ec0f8f5be2379e51df24db0
2021-05-13 16:51:34 -07:00
Xavier Deguillard
472e67081c nfs: convert Mountd to use ImmediateFuture
Summary:
As a first towards converting the code to use ImmediateFuture more broadly,
let's start with a small self contained part of the code.

This is mostly a sed except for the dispatchRpc method that needs to call
.semi().via().

Reviewed By: kmancini

Differential Revision: D28297421

fbshipit-source-id: e706e91fc8f132d4ef742ae98af9bb8304e0bf36
2021-05-13 16:51:34 -07:00
Xavier Deguillard
5ee950f5e0 utils: also call func when an ImmediateFuture holds an exception
Summary:
This code initially was for thenValue, but when I converted it for thenTry I
forgot to also remove the hasException case. We were never calling the callback
on a Try that had an exception.

Reviewed By: chadaustin

Differential Revision: D28302477

fbshipit-source-id: 755fb2c8928627fbe1883f3863cafc360e34a038
2021-05-13 16:51:34 -07:00
Xavier Deguillard
7d48df9938 utils: coerce a SemiFuture<ImmediateFuture<T>> to a SemiFuture<T>
Summary:
When the passed in callback returns an ImmediateFuture, the code had a small
typing bug where we would try to return an ImmediateFuture<ImmediateFuture<T>>
while the function signature expected an ImmediateFuture<T>. This is due to the
SemiFuture code not coalescing a SemiFuture<ImmediatureFuture<T>> into a
SemiFuture<T>.

Reviewed By: chadaustin

Differential Revision: D28293942

fbshipit-source-id: 1bc8f58d387766f29e573499fb37402ff9b49c83
2021-05-13 16:51:34 -07:00
svcscm svcscm
097b3ad7ed Updating submodules
Summary:
GitHub commits:

7ef87f9631
f9c0b03ddd
3d71df7fc4
a26d55fb41

Reviewed By: wittgenst

fbshipit-source-id: 7ea6da757074a21831e20db63eac30c5626fd3f9
2021-05-13 16:21:36 -07:00
svcscm svcscm
5427a7e1f4 Updating submodules
Summary:
GitHub commits:

e3ef839c7f
b087eb6afd
db1ffbfaf7
e8a903166c
33a5c4f1aa
896d7c4199

Reviewed By: wittgenst

fbshipit-source-id: b8359897d77fa713e52a74a54982cb4d11eb0191
2021-05-13 15:50:51 -07:00
svcscm svcscm
5abe36a2ef Updating submodules
Summary:
GitHub commits:

1ba679f749
d65f5d3296
bfef5420b2
7202c5dbf8
d15fbae449
eb3f89278f
8b4ce3c722
1a681d55f5
6c7b50a507
c59bb59e99

Reviewed By: wittgenst

fbshipit-source-id: b68afdea4be294da60e6adaf3b6164fdcd54f172
2021-05-13 15:12:50 -07:00
svcscm svcscm
26c954297b Updating submodules
Summary:
GitHub commits:

4829f99694
eb9c6bfcdb
0883daa2b4
65963a74ec
e56963f6f3
c52c5bd42d
879e72dfe0
bc340677be
57e2b39693
365d44300b

Reviewed By: wittgenst

fbshipit-source-id: 2138ff7920cfb16c71e0ec6e6107f6f057c76fed
2021-05-13 14:34:18 -07:00
svcscm svcscm
57241e3cf6 Updating submodules
Summary:
GitHub commits:

4c23632fe2
4efe13737a
58046d7508
040b68c22d

Reviewed By: wittgenst

fbshipit-source-id: d5b79a2d4ee17688c1b990369a132ac39b84b4a2
2021-05-13 13:51:24 -07:00
Robin Håkanson
cdc908959c Make gitimport concurrency configurable
Summary: Make Mononoke-gitimport concurrency configurable

Differential Revision: D28412978

fbshipit-source-id: 3d1670515980cfd64201271199a94d6ea55b7e59
2021-05-13 12:47:39 -07:00
svcscm svcscm
5724f4cb78 Updating submodules
Summary:
GitHub commits:

d67c56e760
21363c265f
ab7feca46e

Reviewed By: wittgenst

fbshipit-source-id: 9e2486e0c012451880ae072eff504564f7a4b754
2021-05-13 11:57:20 -07:00
Stanislau Hlebik
eab97b6123 mononoke: sync changeset implementation for megarepo
Summary: First stab at implementing sync changeset functionality for megarepo.

Reviewed By: ikostia

Differential Revision: D28357210

fbshipit-source-id: 660e3f9914737929391ab1b29f891b3b5dd47638
2021-05-13 10:04:21 -07:00
Durham Goode
d88b999faf Allow conflict editor prompts during arc pull
Summary:
Mercurial has gotten stricter about respecting interactive vs
non-interactive commands lately, and now is failing to automatically open the
editor for conflicts during arc pull. Let's force Mercurial to treat the
invocation as an interactive one.

Reviewed By: skotchvail

Differential Revision: D28358999

fbshipit-source-id: 551713a78abfe170f04e8e55318af6e157bae7da
2021-05-13 09:40:57 -07:00
Thomas Orozco
cd8efd8afa mononoke/connection_acceptor: prevent starving fwd out of CPU
Summary:
When you spawn a task, Tokio puts it on a "LIFO slot" associated with the
current thread. While the task is in the LIFO slot, it is not eligible to be
run by other threads.

If the thread that just spawned `fwd` above goes and does some expensive
synchronous work in `request_handler` (we'd like to avoid that but sometimes
that happens), then that will delay `fwd`.

This means that notably keepalives will not be sent (you can repro by putting a
`std:🧵:sleep` right after we spawn `fwd`). To mitigate this, we spawn
another dummy taks here. This task will take `fwd`'s place in the LIFO slot,
thus pushing `fwd` onto a task queue where other runtime threads can claim it.

This way, even if this thread goes do some expensive CPU-bound work, we won't
delay keepalives.

This doesn't solve the fact that we probably shouldn't be doing such CPU-bound
work to begin with, but at least it might mitigate the issue such that we don't
have I/O delayed even though the runtime isn't visibly overloaded.

Reviewed By: johansglock

Differential Revision: D28412114

fbshipit-source-id: b56c0156ac6cf991cc899a82e3d2a96c63216fda
2021-05-13 09:27:22 -07:00
Alex Hornby
475c12b197 mononoke: add write mostly store to scrub test cases
Summary: Add a write mostly store to the scrub test cases. This in preparation for next diff where the write mostly case has a new scrub option added.

Reviewed By: krallin

Differential Revision: D28393690

fbshipit-source-id: f7878f5e25814a7d327b1a80d4f96c0867944a14
2021-05-13 04:29:33 -07:00
Alex Hornby
2e5d3d7d25 mononoke: log the blobstore stack being used in manual scrub
Summary: Log the blobstore stack being used for the scrub

Reviewed By: farnz

Differential Revision: D28408340

fbshipit-source-id: 2299f7f7397f48d70b9a8295f0aa28c89bbf5809
2021-05-13 04:29:33 -07:00
Stanislau Hlebik
cbb6e47aa2 mononoke: add mononoke and megarepo_mapping to megarepo_api
Summary: These will be used in the next diffs, let's add initialization here.

Reviewed By: ikostia

Differential Revision: D28409734

fbshipit-source-id: f656db8259f28559df52562f0590382d89f1f0c0
2021-05-13 04:23:11 -07:00
Stanislau Hlebik
f029000974 mononoke: add repo_by_id to Mononoke struct
Summary:
This is an attempt to split D28357210 to make it a bit smaller, so this
new function will be used later.

Reviewed By: krallin

Differential Revision: D28386004

fbshipit-source-id: 42c9ead0668fb78747dcb0fc7c89b6f181f7d9e6
2021-05-13 04:23:11 -07:00
svcscm svcscm
2857a3db38 Updating submodules
Summary:
GitHub commits:

d74e3c9fc7
6a7ce7530a
40835ce628
7c3ff6083b

Reviewed By: wittgenst

fbshipit-source-id: d390109de2bcd4849f4dc22d77dc1db2cf0d6851
2021-05-13 02:52:09 -07:00
svcscm svcscm
0c101b1d84 Updating submodules
Summary:
GitHub commits:

aa49586791

Reviewed By: wittgenst

fbshipit-source-id: 9d68d048b27bdc2a0b8446608e4440891d5145e9
2021-05-13 02:20:27 -07:00
Thomas Orozco
1dfa6006f2 mononoke/connection_acceptor: log more details when clients hang up
Summary:
We have clients mysteriously timing out despite the fact that we should
normally be sending keepalives. To understand this, add some logging so that if
a client disconnects, we log a lot more detailed information to Scuba.

Reviewed By: mitrandir77

Differential Revision: D28383122

fbshipit-source-id: 0e49262bcc08c75f8e06eae17c882742b58ea51d
2021-05-13 01:57:19 -07:00
Thomas Orozco
2304cd1420 mononoke/connection_acceptor: defer ChannelConn construction until we have metadata
Summary:
I'd like to have some socket level logging, and it's good to capture the
metadata there so that we have client identities, session ids, etc.

But I can't do this if I don't have the metadata! This updates our code so that the
metadata is available where this logging will go.

This means we can't rely on loggers in `try_convert_preamble_to_metadata`, but
given this is now only used for hgcli, I don't think that matters, so I just removed it.

Reviewed By: mitrandir77

Differential Revision: D28383121

fbshipit-source-id: 27532f021a9082e74403bba73cad4fc6d0a6d97c
2021-05-13 01:57:19 -07:00
Thomas Orozco
94a1e412ab mononoke: use Arc<Metadata> in sessions
Summary:
I'd like to have some socket level logging, and it's good to capture the
metadata there so that we have client identities, session ids, etc.

To do so I need to not move it into the session. This does that.

Reviewed By: mitrandir77

Differential Revision: D28383123

fbshipit-source-id: 3fd10c3720465824dbcb2528227cbb3521d3068a
2021-05-13 01:57:19 -07:00
svcscm svcscm
e0a0074258 Updating submodules
Summary:
GitHub commits:

375dfabbb3
362745ec43
27f4180ed9
8316faf184

Reviewed By: wittgenst

fbshipit-source-id: bc9e79c389f11eaa3b22554e9a2ddd0898e91564
2021-05-12 21:19:24 -07:00
svcscm svcscm
c5c023a4de Updating submodules
Summary:
GitHub commits:

3f366c1b9a
6b6fc6795d
158ed29268
1da6aeba45
2f0ea09b00
91192bc56f

Reviewed By: wittgenst

fbshipit-source-id: 1401b925a7d1c631999ec4b76303201464271703
2021-05-12 20:45:48 -07:00
svcscm svcscm
e997a5719e Updating submodules
Summary:
GitHub commits:

35942206fc
1d289147e1
d13564093c
a40d4574c9
4d8d9db6b2
12add2472d
50a57f833e
b95f24ca1c
6de0b8bae2

Reviewed By: wittgenst

fbshipit-source-id: 8fb3ff6c4095a34f701031c460f364d5cf8b6726
2021-05-12 20:03:20 -07:00
svcscm svcscm
6fdf71f3f3 Updating submodules
Summary:
GitHub commits:

8eb89fad86
5d9818972e
16619fd834
2cc71d9412
21076e16fa
aa8b86ff7a
33ef290d40
2120ed4096
d15f56e272
51bf5fb636

Reviewed By: wittgenst

fbshipit-source-id: 8096aea6c183473927429b36b2c418761f866231
2021-05-12 19:38:11 -07:00
svcscm svcscm
28bedb34cc Updating submodules
Summary:
GitHub commits:

01c2c5ad2c
1a86340a32
99f856ae20
06209e2582
c23d3050bd

Reviewed By: wittgenst

fbshipit-source-id: 7bdd4d764024e89dac5c97708019668ec1355fc6
2021-05-12 19:10:47 -07:00
svcscm svcscm
0e8b495cc8 Updating submodules
Summary:
GitHub commits:

37c940e0c4
b6d48bedbf
5b60d372df
9f0ed495db
4e259aed56
6e360b2c6c

Reviewed By: wittgenst

fbshipit-source-id: bb01fe0ce8af21cd1f4a1d51cd802c801f2161c5
2021-05-12 18:43:16 -07:00
Andrey Chursin
b7ec4892d9 commitcloud: fix doctest
Summary: D28351849 (2c3edb0989) broke doctest, this diff attempts to fix it

Reviewed By: quark-zju

Differential Revision: D28392077

fbshipit-source-id: 7f1f7261d8996b2c808399954fc895eccc2c1c06
2021-05-12 18:21:10 -07:00
svcscm svcscm
fd1c653826 Updating submodules
Summary:
GitHub commits:

bf7ea7ef74
21cd0db55b
71e4783984
f204799323
d5998687ee
9844564359
6df671a794
84726ead19
19778320ec

Reviewed By: wittgenst

fbshipit-source-id: ebf5c6329d8b30ce32507c1cb76c401c82a86af6
2021-05-12 18:18:45 -07:00
svcscm svcscm
7cb2d7503c Updating submodules
Summary:
GitHub commits:

62526ada56
6aa00e5475
6f7b4a6939
ee360c5550
3e5b7ea18b
da82eebb22
4d2d5ecc18
eebce2ae8a
4d76bc2775
c63a617fc3

Reviewed By: wittgenst

fbshipit-source-id: abae6f816ac2384e598964bbec29d70a85e54d00
2021-05-12 17:44:57 -07:00
svcscm svcscm
f8da29a5ee Updating submodules
Summary:
GitHub commits:

56c3aaf821
f8a9cee837
c464335f11
3da5281953
01d7acadd4

Reviewed By: wittgenst

fbshipit-source-id: 02be90054be15a689d9dbca06345d7f8e5080a2c
2021-05-12 17:22:51 -07:00
svcscm svcscm
6d1c89fdd8 Updating submodules
Summary:
GitHub commits:

677532255b
0eb6c41356
a25e81b8a3
a6ddf12cb0
dcaef1c82d
d4a4c391c6

Reviewed By: wittgenst

fbshipit-source-id: bc0887ee6eec22acf61037f55fb0f0ede959e13e
2021-05-12 16:48:00 -07:00
svcscm svcscm
c2ad010bbf Updating submodules
Summary:
GitHub commits:

4c3dcdb7f1
34a4a5c728
3825ada6c5
ee970883fd
d76c46e6a0
39e6066a88
836b6f3159
2a00d21b26
c6718f9cce
479dd05b9a

Reviewed By: wittgenst

fbshipit-source-id: faf1a60f5f823cdcaf2517ceda73fed788045ac6
2021-05-12 16:17:20 -07:00
Katie Mancini
85942cfaad use portable version of gtest
Summary:
gtest includes some windows headers that will have conflicts with the
folly portability versions. This caused some issues in my in-memory tree
cache diffs (D27050310 (8a1a529fcc)).

We should probably generally be using the folly portable gtests so we can
avoid such issues in the future.

see here for more details: bd600cd4e8/folly/portability/GTest.h (L19)

I ran this with codemod yes to all

- convert all the includes with quotes:
`codemod -d eden/fs --extensions cpp,h '\#include\ "gtest/gtest\.h"' '#include <folly/portability/GTest.h>'`

- convert all the includes with brackets
`codemod -d eden/fs --extensions cpp,h '\#include\ <gtest/gtest\.h>' '#include <folly/portability/GTest.h>'`

- convert the test template
`codemod -d eden/facebook --extensions template '\#include\ <gtest/gtest\.h>' '#include <folly/portability/GTest.h>'`

then used `arc lint` to clean up all the targets files

Reviewed By: genevievehelsel, xavierd

Differential Revision: D28035146

fbshipit-source-id: c3b88df5d4e7cdf4d1e51d9689987ce039f47fde
2021-05-12 15:58:27 -07:00
svcscm svcscm
6d7d3f092b Updating submodules
Summary:
GitHub commits:

7f14f73e42
3aeaf02181
7e13aeedfb
95dd0f23e6
6402842aa3
e87ccebfcf
542f45691d
8914aef29c
1983eff6d6
e87bbd1c34

Reviewed By: wittgenst

fbshipit-source-id: 316247d3b0bce5aa6b14916c7021683150983f17
2021-05-12 15:49:56 -07:00
Katie Mancini
9dee7d6c40 nfs: run custom integration tests on nfs
Summary:
There are a few tests that we don't currently run on both git and hg,
this means we need a new decorator to run the tests on nfs.

Reviewed By: xavierd

Differential Revision: D27953136

fbshipit-source-id: f6e1fab1f763c9b878315336b2cdaa529d36ffe5
2021-05-12 15:01:08 -07:00
svcscm svcscm
37235e34da Updating submodules
Summary:
GitHub commits:

83b07aec49

Reviewed By: wittgenst

fbshipit-source-id: 5532eedf2fef14f7174f05506410483ca5e2869f
2021-05-12 14:51:30 -07:00
Durham Goode
1248a276fa build: use the appropriate python version for getdeps builds
Summary:
getdeps builds are failing on certain versions of Mac because they
choose a system python, which causes setup.py to use a hard coded library
location which isn't correct in our environment. Earlier I changed
pick_python.py to prefer the homebrew python, but it turns out getdeps doesn't
actually use pick_python. This diff fixes that and also instructs python3-sys to
use the correct version, by setting the PYTHON_SYS_EXECUTABLE environment
variable.

Reviewed By: quark-zju

Differential Revision: D28388150

fbshipit-source-id: 9b09e7472733f7a779c6212ae012116cad657b5d
2021-05-12 14:24:20 -07:00
Xavier Deguillard
76111d58c2 privhelper: override the fstype to EdenFS for our NFS mount
Summary:
In order to get Watchman to recognize EdenFS mounted as NFS, we previously set
the f_mntfromname to be "edenfs". Unfortunately, Apple decided that when the
NFS server is accessed via a unix socket it would overwrite that and instead
use the path to the socket.

Digging in the source code, I did find that the f_fstypename can be overwritten
by calling fsctl with the right set of arguments. Thus, let's do just that.

Reviewed By: kmancini

Differential Revision: D28270605

fbshipit-source-id: f6be4e394d814806aa03ec3e82b8bc2faf364ea7
2021-05-12 13:06:57 -07:00
Xavier Deguillard
f2e7099799 nfs: allow mountd and nfsd to bind to a unix socket on macOS
Summary:
Due to NFS being designed as a network filesystem, it default to binding on a
TCP socket. For EdenFS, since we're not expecting to mount an actual remote
filesystem, we bind these sockets to localhost. Unfortunately, TCP sockets have
some inherent overhead due to being designed to be reliable over a non-reliable
medium.

On macOS, Apple provides a way to mount an NFS server that is listening on a
unix domain socket. Thanks for unix socket being reliable, the TCP overhead
goes away leading to some higher throughput and lower latency for the NFS
server. For EdenFS, timing `rg foobar` over a directory containing 27k files gives:

NFS over TCP:
rg foobar > /dev/null  0.80s user 5.44s system 567% cpu 1.100 total

NFS over UDS:
rg foobar > /dev/null  0.77s user 5.27s system 679% cpu 0.888 total

osxfuse:
rg foobar > /dev/null  0.87s user 5.59s system 662% cpu 0.975 total

The main drawback of going through a unix socket is that D27717945 (bcf6aa465c) appears to
no longer be effective due to
8f02f2a044/bsd/nfs/nfs_vfsops.c (L3739)

Reviewed By: kmancini

Differential Revision: D28261422

fbshipit-source-id: 25dc1dc78cdb50d6c6550a86ef01ea2c894c110f
2021-05-12 13:06:57 -07:00
Xavier Deguillard
fdbedc4818 nfs: allow mountd and nfsd sockets to be non-inet on macOS
Summary:
macOS supports NFS servers that can be reached via a unix socket as a way to
improve performance by reducing the TCP cost. To support this, let's first
allow the socket to bind to to be passed to the RpcServer, and then pass it
through to the privhelper code.

Reviewed By: kmancini

Differential Revision: D28261423

fbshipit-source-id: 78c60aac26353d1da76a67897429b964332df8b3
2021-05-12 13:06:57 -07:00
svcscm svcscm
a22ed01bfe Updating submodules
Summary:
GitHub commits:

36a8e0f3ee
9203e66516
e9a0bc14dd
f065c670ec
52b653c3ec

Reviewed By: wittgenst

fbshipit-source-id: 97c1c721cc0674d3cdbbfe3136b85e1e886055e6
2021-05-12 12:33:19 -07:00
Xavier Deguillard
6de9b24cb0 Back out "checkout: keep InodeNumber constant during checkout"
Summary: Looks like this is causing files to not be immediately updated after an update.

Reviewed By: kmancini

Differential Revision: D28384151

fbshipit-source-id: 61159db64a9f3c9c1f9e54ee0462ca870ff2aecc
2021-05-12 12:26:53 -07:00
Jan Mazur
490cbbf0c3 mocking LFS in revisionstore tests
Summary: Mocking LFS server.

Reviewed By: krallin

Differential Revision: D28093406

fbshipit-source-id: fe6acb2e327ee26dd424d91b66ed725339f19431
2021-05-12 12:05:05 -07:00
Kostia Balytskyi
0a58fc0c46 megarepo_api: introduce a MegarepoApi struct to rule them all
Summary:
This struct is intended to be a single entry-point to the megarepo logic. It is also intended to be owned directly by scs_server without the `Mononoke` struct (from `mononoke_api`) intermediary. In effect, this means that mononoke server won't be affected by `MegarepoApi` at all.

Apart from adding this struct, this diff also adds instantiation of prod `AsyncMethodRequestQueue` and wires it up to the scs_server to enqueue and poll requests.

Reviewed By: StanislavGlebik

Differential Revision: D28356563

fbshipit-source-id: b67ee48387d794fd333d106d3ffd40124086c97e
2021-05-12 12:00:20 -07:00
svcscm svcscm
1c34efcfdb Updating submodules
Summary:
GitHub commits:

6224b9348a
0a43167ac4
b9054c5b81
46c67852fe
a6e425dc44
97089cb024
4adf4365c6
3abd78ed74
4b8aaad426

Reviewed By: wittgenst

fbshipit-source-id: b6edd87863b6c808b827a616577f2f66c1eebe80
2021-05-12 11:53:54 -07:00
svcscm svcscm
4b6bef1b78 Updating submodules
Summary:
GitHub commits:

a0fd7fbde5

Reviewed By: wittgenst

fbshipit-source-id: 8b9c94d7ccffe85eb58fceaebe43bccc36d8af5b
2021-05-12 09:17:04 -07:00
Ron Mordechai
77b7617d4b Add myparenttags
Summary: I use tags extensively and I love them to be supported as well.

Reviewed By: asm89

Differential Revision: D28348565

fbshipit-source-id: 7d94d048b734c91e7d74a1c3efeefc87943066ad
2021-05-12 08:20:53 -07:00