Commit Graph

65553 Commits

Author SHA1 Message Date
Thomas Orozco
f5d4e0b5f7 manifold/client: take IOBufShared data as input for writes
Summary:
Currently, we take a `&mut (dyn Buf + Send)` as input when writng to Manifold.
This has a couple of downsides:

- It's not very ergonomic. From the API it's not obvious what mutations are
  going to be done on your `Buf` exactly (it's going to be consumed entirely),
  and it often results in code that's a little clumsy (see what I had to change
  here), where make calls like `write(&key, &mut mydata.clone())`.
- It limits what we can do with it. If you already have a `IOBufShared` on
  hand, you shouldn't need to copy it in order to pass it to Manifold, but
  currently the Manifold client code does have to copy it because all it sees
  is a `dyn Buf`.

This diff updates the client to take a `IOBufShared` directly, which has plenty
of convenient `From<...>` conversions (and some efficient ones like
`From<Bytes>`, which doesn't copy the `Bytes` at all).

Reviewed By: ahornby, Imxset21

Differential Revision: D28535539

fbshipit-source-id: bba1b963a96350ad57cc0fbfcc31f7e1eb36c317
2021-05-19 09:57:20 -07:00
Midhun Somasundaran
6dca23bac0 Add neighbor entry verification tests
Summary: Adding tests to verify that NDP and ARP entry resolution happens correctly on Aggregate ports. Recently we have seen sevs where ARP resolution happens incorrectly on subports

Reviewed By: jasmeetbagga

Differential Revision: D28156706

fbshipit-source-id: 3066620e9ed0d8805cf0d2733ea6fdece47b4254
2021-05-19 09:45:19 -07:00
Stanislau Hlebik
8716b24d75 mononoke: make gettreepack buffer size configurable and change default to 1000
Summary:
The goal of this diff is to make gettreepack requests that need to fetch a lot
of entries from blobstore faster.

Some of the gettreepack requests take really long time if they need to fetch,
say, 60K blobs. While this number of blobs is relatively high, it certainly
shouldn't take 1.5 mins to finish.

Upon closer inspection it looks like the reason for this slowness is a
combination of tokio coop mechanism and extremely large buffer size. Disabling
tokio coop and/or decreasing the buffer size makes requests significantly
faster (though I have to admin I didn't dig deeper to understand why they cause
this slowness).

To mitigate the issue I decided to decrease the buffer size first. This is a small
and predictable change that will be very easy to revert with tunable. Besides
having a buffer size of >1K doesn't make a lot of sense anyway, because we have
1K cachelib shards. Also this 10K buffer size was set a long time ago
(D8610582 (3dcf0048d8)), and there weren't a lot of measurements done to justify this size.
From the summary it seems that the problem was in slow manifold fetches from
remote regions, but as I said above, setting it highger than 1K is not helpful
anyway.

Reviewed By: krallin

Differential Revision: D28536686

fbshipit-source-id: 5f0ea04af8ce0c54c79d9668d95f2a1ece10f047
2021-05-19 07:30:06 -07:00
Liubov Dmitrieva
9f9bcd2c70 check commit cloud workspace for removing irelevant branches
Summary: If you have checked out a shared workspace or other user workspace, this part of hg doctor could hide incorrectly, so, should be skipped.

Reviewed By: markbt

Differential Revision: D28505928

fbshipit-source-id: 65e1b3978a916fad2a33bb4f81ff1b75cd657567
2021-05-19 07:03:21 -07:00
svcscm svcscm
fc2dd73bd8 Updating submodules
Summary:
GitHub commits:

af3989c528
330f74c881
2e54e12f18
52eb0d5f99

Reviewed By: yns88

fbshipit-source-id: 17774ab4a5cb5bc57ecb2f45cd449b6e7cd65874
2021-05-19 06:46:07 -07:00
svcscm svcscm
10864d5bd0 Updating submodules
Summary:
GitHub commits:

470e1e5f8f
f091b02eb1
91310626fd
317c8cc55e
74f96d7106
d71e870e6e
f113eb1654

Reviewed By: yns88

fbshipit-source-id: fa50fdf67e3c82b5b9a3271a22af459906105fae
2021-05-19 06:01:19 -07:00
svcscm svcscm
5dc1aa1284 Updating submodules
Summary:
GitHub commits:

9c790465c9
18baffb729
52445bcb83
97c16db9aa
11e1dae100
1e1ca7b0da
942cdb5228
f113921eac
1707640b1a

Reviewed By: yns88

fbshipit-source-id: 6ffa1c68a589403938a38eee47059bfa1ef3c312
2021-05-19 04:37:20 -07:00
svcscm svcscm
70b5c203ef Updating submodules
Summary:
GitHub commits:

5219b46c7a
ec22c4c30b
6a55edf33a
38cd421386
41a8888dd1
7ecd89ae8d
c10c227e7e
be7cfc0e63
46cb68eaea
421ca303b8
b386987b4c

Reviewed By: yns88

fbshipit-source-id: a14c86cd9881c9b4ec0e98cb5121e6530208c72a
2021-05-19 04:00:46 -07:00
Simon Farnsworth
24a157be39 Teach the packer to do multiple packs in a single process
Summary:
Paying the setup and teardown overhead of multiple processes seems silly, when we can pack in parallel in a single process.

Make it possible to run multiple packing runs from a single packer process

Reviewed By: ahornby

Differential Revision: D28508527

fbshipit-source-id: eab07d028db46d62731f06effbde2f5bc5579000
2021-05-19 03:32:40 -07:00
svcscm svcscm
a06c2ca88f Updating submodules
Summary:
GitHub commits:

20ac3b3dd8
8140959ee9

Reviewed By: yns88

fbshipit-source-id: c09217624952935b10a0ed66a9b3170316a0a444
2021-05-19 02:03:11 -07:00
svcscm svcscm
7815132582 Updating submodules
Summary:
GitHub commits:

e170d474e5
a5f8003e19
9db6d38124
708b32633c
893872dbe8

Reviewed By: yns88

fbshipit-source-id: a8d09e66e19731d560d48aef9be1641d12ca8c1a
2021-05-18 23:56:00 -07:00
svcscm svcscm
af611238ea Updating submodules
Summary:
GitHub commits:

58a4d78e6d
03d9110f91
9719ce3df3
36316a9a33
0f43293c2b
0c2e7635d2

Reviewed By: yns88

fbshipit-source-id: 430ddf4d8a4224cd50329bcd9a7bfef0396f81a0
2021-05-18 22:21:30 -07:00
svcscm svcscm
b53513822a Updating submodules
Summary:
GitHub commits:

ac662a4f00
bbfb42b305
fd3496b565
832e5be354
efdafab36e
fd8f4c2c8f
b1cce88688
aa6dcc4e01
b6315dca56

Reviewed By: yns88

fbshipit-source-id: 3d5a7102d868c0c26f176f46dbabe81b8ad146b1
2021-05-18 21:03:40 -07:00
svcscm svcscm
c7298dcf58 Updating submodules
Summary:
GitHub commits:

39c1aa032c
08857223a0
c59f93dd91
6a1ba4f826
9d61a0856d
8875ea1c1d
68e1262bfe
d039da67f9
f4a9b0a717
21ae758969
849868921a
cfca8727aa

Reviewed By: yns88

fbshipit-source-id: b14fbaf8599f7ca1d5d139b6f0fa2cad147693d8
2021-05-18 20:21:33 -07:00
svcscm svcscm
6f0fb369ab Updating submodules
Summary:
GitHub commits:

d452bb207b
6a2ffde6ff
f45b015270
57fc0cfb24
ef6c6c2128
5ae4c2df66
368c01496a
f57105c9f9

Reviewed By: yns88

fbshipit-source-id: 5c84a7afff50ed9eddb07b65e093b53a3e5a31b8
2021-05-18 19:47:39 -07:00
svcscm svcscm
9e4dfc81ca Updating submodules
Summary:
GitHub commits:

c0a3b29009
60e5af83c1
5960574975
d5177fd458

Reviewed By: yns88

fbshipit-source-id: 16925fa8dc7cb9bcd2db0fe12df5b30ba2176c27
2021-05-18 19:05:09 -07:00
Xavier Deguillard
36d6e80dfb inodes: remove test main
Summary: Tests appear to pass without it, remove it.

Reviewed By: chadaustin

Differential Revision: D28521826

fbshipit-source-id: a44650552380485719f7ad1418a01fb717872f74
2021-05-18 18:27:07 -07:00
Robin Håkanson
4790bab686 Improve git-import speed - save_bonsai_changesets
Summary:
Improve git-import speed by grouping many BonsaiChangests into each call to save_bonsai_changesets.

During earlier profiling noticed that the speed of gitimport was dictated by the save_bonsai_changesets, by doing this we can split the speed more evenly between save_bonsai_changesets and the steps to derive the diff and upload the missing file-blobs.

For profiling and performance analysis details please see
https://fb.workplace.com/groups/1619247701796399/permalink/1709890502732118/

Reviewed By: StanislavGlebik

Differential Revision: D28497973

fbshipit-source-id: 0fbcf37535554dd96664da4906633eeb07c58f7c
2021-05-18 16:31:15 -07:00
svcscm svcscm
ffe5a114f8 Updating submodules
Summary:
GitHub commits:

a8b9587a13
23b17ed903
8d5d1d6e2f
07666a4b4b
8327e856f1

Reviewed By: yns88

fbshipit-source-id: 16f383ce59812ec6c59548a374a832c4f3a9adb1
2021-05-18 13:34:40 -07:00
svcscm svcscm
82275defc2 Updating submodules
Summary:
GitHub commits:

9ccf498f46
8f982803bb
57c18a752d
e49bb5a5ad
fad5a1271c
cfafe244e6

Reviewed By: yns88

fbshipit-source-id: 6223ab8234f8ea85157ffe9efecdc21e78a8db30
2021-05-18 12:51:13 -07:00
svcscm svcscm
c57960fed4 Updating submodules
Summary:
GitHub commits:

561bcd4557
f250d3f45d
590c04a4ad
8956754b2c
34a1ae94df
b2602948b6
7e9086de8d
992ba71b09
612763717c
f9b4ed83ad

Reviewed By: yns88

fbshipit-source-id: 80e3f2a40978e9d86870fc2b7d4c84b5a0cf4e13
2021-05-18 12:14:44 -07:00
Stanislau Hlebik
a7d0737808 mononoke: replicate D28287486 logic to MultiplexedBlobstore::get()
Summary:
In D28287486 (b9b5e16dcf) we added logic that should prevent some of the failures on
is_present() checks. However some parts of the codebase rely on `get()`
returning None and they don't use is_present() at all - in particular, that's
what configerator-a is doing.

Given that we have failures of our derived data tailer, let's try to replicate
the logic from is_present() to get().

Reviewed By: krallin

Differential Revision: D28506739

fbshipit-source-id: a37d6c4b5a43aa9a1284499831fcdc3ee5605b9e
2021-05-18 11:41:40 -07:00
svcscm svcscm
1f75d60ff8 Updating submodules
Summary:
GitHub commits:

b84bc05872
ceceda5d33
dc9020cad8
8055238371
b1665f19ef
58b6f68988
9bbe1c94e9
dce3dd6b66
14518e691b
23d3151bda
ffe878a672
d07c06617e

Reviewed By: yns88

fbshipit-source-id: dcfe8e9030fb991f96df4d9251789ac1570548d5
2021-05-18 11:37:18 -07:00
Carolyn Busch
411ed7adf5 infinitepush: use bookmark http api
Summary: Fetch bookmarks via the http edenapi protocol in the bookmark command with the --list-remote option when all bookmark patterns are full bookmark names (not prefixes).

Reviewed By: kulshrax

Differential Revision: D27331526

fbshipit-source-id: 4f4eda255c551c9b55c6966569755f493335b458
2021-05-18 11:10:33 -07:00
Thomas Orozco
9f9709fcd8 mononoke/gotham_ext: update away from deprecated async-compression stream module
Summary:
This is deprecated now: https://docs.rs/async-compression/0.3.8/async_compression/stream/index.html

Lets update as documented there.

Reviewed By: farnz

Differential Revision: D28509889

fbshipit-source-id: b28713fcad3b1b2ec3ff8bec766fe05c4edba200
2021-05-18 10:30:22 -07:00
Thomas Orozco
f5e024f889 mononoke/blobstore: don't use Buf::bytes() to get a slice
Summary:
This is currently calling `Buf::bytes()` in order to get a `&[u8]` out of
`Bytes`, but this method isn't actually guaranteed to return all data in the
`Buf`: https://docs.rs/bytes/0.5.6/bytes/trait.Buf.html#tymethod.bytes

> Note that this can return shorter slice (this allows non-continuous internal representation)

In practice this is fine because `Bytes` does in fact have a contiguous
internal representation (which is why we can call `as_ref()` on it), but let's
do the more correct thing here.

(I happened to spot this while looking into the feasibility of a Bytes 0.5 ->
Bytes 1.x upgrade, where this `bytes()` method was renamed to `chunk()`)

Reviewed By: farnz

Differential Revision: D28507885

fbshipit-source-id: 73e5f1ba587292f772c702127a3933ea76fceb9f
2021-05-18 10:30:22 -07:00
svcscm svcscm
0bd512d811 Updating submodules
Summary:
GitHub commits:

8da701205f
7264d7f00c
b648738e76
ac7a8386db
04bd376e63

Reviewed By: yns88

fbshipit-source-id: 12de522b570900e156e0cae9349ae5de8a9aa5f1
2021-05-18 10:20:06 -07:00
svcscm svcscm
705ebd2c72 Updating submodules
Summary:
GitHub commits:

f92cd65e8c
f2b00a5247
c9b7dae8c3
ab276cc0c7
956ba9d64f
ec83dea644

Reviewed By: yns88

fbshipit-source-id: 46a7dcb36a39a7e055b10bf0121de6f2075e2d63
2021-05-18 09:38:58 -07:00
Mark Juggurnauth-Thomas
5dafb7333f commitcloud: support --workspace-version in hg cloud sl --history
Summary:
The --workspace-version option is currently ignored by interactive history.
Allow it to be used to specify the initial version.  This makes jumping back to
a much older version easier.

Reviewed By: liubov-dmitrieva

Differential Revision: D28478194

fbshipit-source-id: f4f121d919e89c298677256f227f2e96d63ef644
2021-05-18 09:16:15 -07:00
Xavier Deguillard
cdb6b9ca6d inodes: remove debug logs
Summary: For whatever reason some of my debug logs got landed :(

Reviewed By: fanzeyi

Differential Revision: D28510825

fbshipit-source-id: 65bd9165020bfe3afff54109a9f550a460266737
2021-05-18 09:08:21 -07:00
svcscm svcscm
9e7f783c6e Updating submodules
Summary:
GitHub commits:

0ac6158ccf

Reviewed By: yns88

fbshipit-source-id: 9e0617ad3416d2b0e504e9332c476d708e907792
2021-05-18 08:09:56 -07:00
Thomas Orozco
aaf01dae8c mononoke/bookmarks: fix a flaky test
Summary:
This test is a bit flaky because its execution depends on the other in which 2
futures that are spawned execute, which isn't entirely deterministic (those
tests were using a multi-threaded runtime, I'm also fixing this here).

Reviewed By: ahornby

Differential Revision: D28507337

fbshipit-source-id: 3c33dc7ffe73de0c6696523ed49d3b30ceda82c0
2021-05-18 08:07:41 -07:00
Stanislau Hlebik
e9ec3955c5 mononoke: add a simple test for sync changeset
Summary:
Simple test that syncs a single commit from a source to a target.

A few notes
1) I want to use test Mononoke instance, but I can't initialize them in another
crate because of cfg(test). I removed cfg(test) to make it possible.
2) I initialized megarepo mapping in TestRepoFactory so that all tables
were in the same db. It's not strictly necessary, but makes initialization a bit simpler.

Reviewed By: mitrandir77

Differential Revision: D28444865

fbshipit-source-id: f39c917806709606ce8e5a1c1158f186d239d8b8
2021-05-18 07:37:56 -07:00
Stanislau Hlebik
3011aab0f8 mononoke: save latest synced changesets in blobstore instead of db
Summary:
In order to sync changesets we need to know what was the latest synced
changeset from a given source. Previously we wanted to store this data in sql,
however later we decided to store it in the file in the repo. The main reason
for doing that is that storing data inside the repo gives us both blame and
history, while database can't provide that.

This diff implements that - removes all the sql-related code for storing latest
synced changesets and instead puts the data inside the file in the repository.
Note that we still using sql to store mapping between (source, target)
changesets.

Reviewed By: mitrandir77

Differential Revision: D28470102

fbshipit-source-id: 996905b17ad4b0d5b0ea1e40c73d762850e113a8
2021-05-18 07:37:56 -07:00
Stanislau Hlebik
790cda7468 mononoke: make test megarepo configs a bit more useful
Summary: Now it's at least possible to add new configs

Reviewed By: mitrandir77

Differential Revision: D28444866

fbshipit-source-id: cf0e2e737a125bdbd3b7eff55e8ee3f1d5a193d2
2021-05-18 07:37:56 -07:00
Thomas Orozco
27b248c075 mononoke: track last updated log for bookmarks
Summary:
Like it says in the title, this updates bookmarks to track the log id of their last update.

This will let us do incremental queries from the WBC. See the design doc linked to the
task here for details.

Reviewed By: farnz

Differential Revision: D28444852

fbshipit-source-id: e966ced8e136ad6c4306e977e21670caa457ea71
2021-05-18 05:34:31 -07:00
Liubov Dmitrieva
add020c9f3 increase commit cloud history limit for 12 weeks by default
Summary: increase commit cloud history limit for 12 weeks by default

Reviewed By: markbt

Differential Revision: D28476878

fbshipit-source-id: d66d2bd672232932b698fece143eeac82d426886
2021-05-18 02:11:53 -07:00
svcscm svcscm
85247fcb80 Updating submodules
Summary:
GitHub commits:

7816a2645c
c074d4fdae
05f80f2950
33d330c503

Reviewed By: yns88

fbshipit-source-id: e5d0002297ee52227cc126f690a3c5b3e09dedef
2021-05-18 00:22:47 -07:00
svcscm svcscm
904d6ae92f Updating submodules
Summary:
GitHub commits:

49ca110059
83d1a66598

Reviewed By: yns88

fbshipit-source-id: 1e2c05206f59e299024a1971756d8b23c8f5b388
2021-05-17 23:41:11 -07:00
Zeyi (Rice) Fan
847e9d597d introduce basic fsck test cases
Summary: This diff introduces some currently failing test case to demonstrate the issue of files being created when EdenFS is not running on Windows. The tests are disabled for now since they are still failing. Later diffs should fix the issue this demonstrated and we can enable these tests on Windows at then.

Reviewed By: chadaustin

Differential Revision: D25285548

fbshipit-source-id: f0738bca05cfc82e5bf7b8238d009dc59bce93ca
2021-05-17 23:38:03 -07:00
Zeyi (Rice) Fan
1ad184455b inodes: implement FSCK for Windows Tree Overlay
Summary:
This diff implements FSCK for EdenFS Windows.

On Windows, users can still modify EdenFS mounts even when EdenFS is not
running, which may cause mismatch between EdenFS state and on-disk view. This
subsequently may cause issues when EdenFS is running again (such as permission
error, not seeing added entries in `hg status`, etc..).

This diff adds FSCK to EdenFS Windows. It is not exactly same as what fsck
traditionally do on *NIX systems. We are still dubbing it as FSCK since it
works at the same place as eden fsck.

At startup, FSCK will crawl the EdenFS mount to compare the overlay state with
disk state. It then synchronizes the overlay view with what the user has on
disk. Note Windows does not always permit user to modify the mount, it only
allows changes in certain situation. In particular, when the directory is in
Full state, this diff takes advantage of that so we can finish the scanning by
only scans such directories.

One limitation of Windows FSCK is that, it cannot reliably tell if the user
deleted a directory or file from dirty placeholder directories. This is because
ProjectedFS will hide untouched entries under dirty placeholder directory when
EdenFS is not running, and there is no way we can tell if the entry is gone
because of user deletion or hid by ProjectedFS.

This is not perfect but acceptable to some extent. One possible failure scenario is:

1. User creates a directory named `foo`.
2. User writes a file to that directory (`foo/bar`).
3. EdenFS then stops running.
4. User then deletes the entire `foo` directory on disk.
5. EdenFS starts again, `foo` will be recrated with an empty `bar` file. This
   will still correctly show in `hg status`, and the user is able to delete
   them again.

Reviewed By: xavierd

Differential Revision: D27872753

fbshipit-source-id: c553db568379062ff4504204c1a1785664f87c00
2021-05-17 23:38:02 -07:00
svcscm svcscm
bfd76d33b9 Updating submodules
Summary:
GitHub commits:

30053e911f
af173b80df
d83542ca83
608375aacf
4a77d4c4cc

Reviewed By: yns88

fbshipit-source-id: 3fb4889d7d63827a57feb2d3d2f788a3673beae8
2021-05-17 20:09:24 -07:00
Manish Rajpal
604ec1da74 relax version mismatch check
Summary:
We want eden doctor to report a problem about mismatched running and installed version only if the running version is more than 2 weeks older than installed.

Please see task for more context

Reviewed By: fanzeyi

Differential Revision: D28464491

fbshipit-source-id: 34b9b4cf533482f3006100bbf675c89ea7ee6fff
2021-05-17 19:36:05 -07:00
svcscm svcscm
d050e0d073 Updating submodules
Summary:
GitHub commits:

cf6a74ff0c
44c6af3a2e
bcd669a9b5
d75d034bd4
8876b694f2
3fa600fc77

Reviewed By: yns88

fbshipit-source-id: 7cad136f3655fc2170a211cde80d620cac65f237
2021-05-17 18:35:01 -07:00
svcscm svcscm
10f3e5d8d8 Updating submodules
Summary:
GitHub commits:

5f14e859e6
228249510d
9d302bddde
dc8e910d8e
0964b7c8e2
dd7a65d60b
aee2ba3c43
0fc199c269
c05695e862

Reviewed By: yns88

fbshipit-source-id: 12c16c42d1311ad1b5b26719904271b386a5fb23
2021-05-17 17:36:28 -07:00
svcscm svcscm
803fc0117f Updating submodules
Summary:
GitHub commits:

57d9fb5f22
a71b4f60c1
58393df6ab
e213fc0e96
c4b0cb9ca6
9abe4ed41f
5dc0e15c88
b9d5002b2c
1179dd4a9b
d4a622802f

Reviewed By: yns88

fbshipit-source-id: c7c7b21b974ea5c7721ef80d194be9862cdb6362
2021-05-17 16:57:26 -07:00
svcscm svcscm
8d783ced22 Updating submodules
Summary:
GitHub commits:

29b8bb7ff8
f86f51df28
b9f3d9be47
0ed8cb666d
3c353e8ade
276fdfb321

Reviewed By: yns88

fbshipit-source-id: 523bc3becce4c5802e2f4ebe4459f45648117863
2021-05-17 16:13:16 -07:00
Zeyi (Rice) Fan
d78264f594 windows: build Rust fbclone with Mercurial
Reviewed By: genevievehelsel

Differential Revision: D28299629

fbshipit-source-id: 8420054c848fc50e52db1c90ffc4022a858beb43
2021-05-17 15:45:34 -07:00
svcscm svcscm
519ab82cd1 Updating submodules
Summary:
GitHub commits:

cdcb7d40ec
31ee242dbc
c1734991c6
23a86274c2
1382f4f5f4
9f2f9e196f

Reviewed By: yns88

fbshipit-source-id: 3f641a43ee48ae261ae5689387c6c649ead17080
2021-05-17 15:12:15 -07:00
svcscm svcscm
c5a35abc86 Updating submodules
Summary:
GitHub commits:

058095930d
6a38bb4af0
d4e6d4aff3
0a01d1135d
c180e2d196
1472efa23b
3e79317b63
018d8b4003
5b6daebf5d

Reviewed By: yns88

fbshipit-source-id: f270bf6538a38ca8d33ff88681abba2e4347f1ac
2021-05-17 14:32:46 -07:00