Commit Graph

58482 Commits

Author SHA1 Message Date
Katie Mancini
480277e328 refactor - move ObjectFetchContext to its own file
Summary:
In following changes I will be threading ObjectFetchContext into the backing
store importing process, since this will start to be used more outside of the
ObjectStore, I am moving this class into its own files.

Reviewed By: chadaustin

Differential Revision: D22022488

fbshipit-source-id: 1a291fea6e0fd56855936962363dfc9f6de8533d
2020-06-23 10:02:40 -07:00
Thomas Orozco
edf93f8676 mononoke/blobstore_healer: limit concurrency of healing
Summary: Let's not heal 10000 blobs in parallel, that's a little too much data.

Reviewed By: farnz

Differential Revision: D22186543

fbshipit-source-id: 939fb5bc83b283090e979ac5fe3efc96191826d3
2020-06-23 09:00:29 -07:00
Thomas Orozco
e288354caf sparse: prefetch trees before iterating through the whole manifest
Summary:
If we're going to iterate through the whole manifest, we should probably
prefetch it. Otherwise, we might end up doing a whole lot of sequential
fetching. We saw this this week when a change landed in sparse profiles that
caused requests to Mononoke to increase 100-fold.

Unfortunately, I don't think we can selectively only fetch the things we are
missing, so this just goes ahead and fetches everything unconditionally. If
there is a better way to do this, I'm all ears.

Reviewed By: StanislavGlebik, xavierd

Differential Revision: D22118926

fbshipit-source-id: f809fa48a7ff7b449866b42b247bf1da30097caa
2020-06-23 08:37:23 -07:00
Thomas Orozco
be0d091f91 sparse: add a perf trace scope for sparse profile update additional actions
Summary: This makes it easier to understand why we're fetching so much data.

Reviewed By: quark-zju

Differential Revision: D22114905

fbshipit-source-id: 7cb6d5c9aebcc8c9089891e030b02176e208bd0f
2020-06-23 08:37:23 -07:00
Thomas Orozco
c0de16606e mononoke: fix broken blobrepo override refactor
Summary: This got broken in D22115015 — this fixes it.

Reviewed By: farnz

Differential Revision: D22186138

fbshipit-source-id: 54c05466cdbd3be4f6887a852f099351ea5e891e
2020-06-23 08:10:13 -07:00
Viet Hung Nguyen
2cf5388835 mononoke/git: moved fn gitimport to import_tools
Summary: Moved fn gitimport + do_upload and find_file_changes functions (fn gitimport uses them) to import_tools (previous refactor commits: D22135765, D22139276).

Reviewed By: StanislavGlebik

Differential Revision: D22159880

fbshipit-source-id: ba97a77fdada97ad8c348e16e5edcd7ad58662af
2020-06-23 05:16:01 -07:00
svcscm
b47ba5bbc6 Updating submodules
Summary:
GitHub commits:

d22c5b7f65

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: bd239eb768785f05d0f431117232e2edd3ce3a1e
2020-06-23 04:39:51 -07:00
Kostia Balytskyi
6b370f24e3 tests: add configerator commitsync fixtures
Summary: This will be used in the following diffs. It just adds commitsync fixtures in a single place, so that we can later play with them in integration tests.

Reviewed By: StanislavGlebik

Differential Revision: D21952665

fbshipit-source-id: 2933a9f7ea8343d5d52e6c3207e7d78a3ef0be25
2020-06-23 04:33:17 -07:00
svcscm
d694998dec Updating submodules
Summary:
GitHub commits:

c289b7f569

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 698d566320f036801b15d9071a2223995111d214
2020-06-23 01:35:03 -07:00
svcscm
1d2a20343f Updating submodules
Summary:
GitHub commits:

b1b2993aad
80f7058b61
f6308a459e
8f0b3ec6ff
c4241df843
1b7ee174d3
08f357d6c8
f63ea92e5d
bb7ef2bec0
84a0e8ee63
4eb8d32ed6

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 9854d78015c5938a4bceb40c36b691edd2344176
2020-06-23 01:35:03 -07:00
svcscm
e3296a6c78 Updating submodules
Summary:
GitHub commits:

9322e70f43
5b32e69a10
183e82f46a
59ce0d0d26
7b51c12b9f
e8931303cc
b7c87f5988
87dc0ea65c
58156db1cd
d803368008
a17109fa9d
5e55e7fad0

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d142c88c16ae30b994b101b6455d11f7e1a1e977
2020-06-22 20:20:20 -07:00
Shrikrishna Khare
58eac05c56 fbcode_builder: getdeps: OpenNSA update source URL
Summary:
We had to fork OpenNSA and clone from it, see D19437386 for details.
Broadcom has now started hosting OpenNSA as a tarball.
Thus, we no longer need to maintain a fork (yay!)

This patch points opennsa manifest to fetch opennsa from this new location.

Reviewed By: bkoray

Differential Revision: D22175932

fbshipit-source-id: 51cd777ab836e4f191d78fbb2312925e446ca38f
2020-06-22 19:39:11 -07:00
Zeyi (Rice) Fan
8cc4c2f5c5 fix encoding bug
Summary: This bug can be triggered when your computer name contains emoji. getdeps.py will fail to create this file due to Python attempts to write the file as cp1252 (Windows's default encoding)

Reviewed By: wez

Differential Revision: D22171935

fbshipit-source-id: fc3be2d1050c17ddbe05a0fc91d6613865f092ce
2020-06-22 19:05:28 -07:00
Durham Goode
f9c03960e2 py3: set LC_ALL for a rm line in test-fb-hgext-pushrebase-cannot-rebasepublic.t
Summary:
This test appears to fail when run in hgbuild. It's not clear why it
doesn't repro locally, but it appears to be a locale issue, so let's just for it
to use C.

Reviewed By: singhsrb

Differential Revision: D22178365

fbshipit-source-id: 007c86681ff1bd4845b1feb41b7bbb031edf172b
2020-06-22 19:01:02 -07:00
svcscm
555ec831e4 Updating submodules
Summary:
GitHub commits:

f74b4d5fe4
ef34a4cf89
8805ec2792

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7b26d2f0b17134c8401e1fcf9bd8b0ad1871fb49
2020-06-22 18:38:38 -07:00
Jun Wu
24cec5f002 phrevset: be robust about unexpected server responses
Summary:
The server response is not strictly typed. Accessing fields might error out.
Protect against those errors.

Reviewed By: chadaustin

Differential Revision: D22169401

fbshipit-source-id: 4e57220d03c322b5b40d81ac63f4391e286525e4
2020-06-22 17:14:03 -07:00
Jun Wu
eee323b08b util: optimize truncatefile
Summary:
On platform the code is expected to run (Windows), the performance difference
is significant (ex. 1.3s -> 0.8s).

The following benchmark emulates truncating the last 4 revisions from changelog:

```
# hg debugshell on Windows
In [2]: clsize = repo.svfs.stat("00changelog.i").st_size

In [3]: def f1():
   ...:     util.tryunlink(repo.svfs.join("new"))
   ...:     shutil.copyfile(repo.svfs.join("00changelog.i"), repo.svfs.join("new"))
   ...:     with repo.svfs.open("new","a") as f:
   ...:         f.truncate(clsize - 256)

In [5]: def g1():
   ...:     util.tryunlink(repo.svfs.join("new"))
   ...:     with repo.svfs.open("00changelog.i") as f1, repo.svfs.open("new", "w") as f2:
   ...:         size = clsize - 256
   ...:         while size > 0:
   ...:             bufsize = min(size, 1 << 24)
   ...:             f2.write(f1.read(bufsize))
   ...:             size -= bufsize

In [6]: %timeit f1()
1 loop, best of 3: 1.13 s per loop

In [7]: %timeit g1()
1 loop, best of 3: 716 ms per loop

In [8]: %timeit f1()
1 loop, best of 3: 1.51 s per loop

In [9]: %timeit g1()
1 loop, best of 3: 853 ms per loop

In [30]: %timeit f1()
1 loop, best of 3: 1.28 s per loop

In [31]: %timeit g1()
1 loop, best of 3: 755 ms per loop
```

I also removed the `vfs.exists` test as the function should raise if the file
does not exist.

Reviewed By: DurhamG

Differential Revision: D21974771

fbshipit-source-id: 358579c057eb694ce6e5b135cf95067dbc66f6f3
2020-06-22 17:11:11 -07:00
Arun Kulshreshtha
c1d964b17e tests: make EdenAPI server available to tests
Summary: Add the EdenAPI server to the `hg_mononoke_run_tests` test target. This will make it possible to start an EdenAPI server in Mercurial's Buck tests.

Reviewed By: quark-zju

Differential Revision: D22147098

fbshipit-source-id: 1e29b7c06f1dd74f26d821943cd44ef09a7d505f
2020-06-22 15:18:20 -07:00
svcscm
95778da581 Updating submodules
Summary:
GitHub commits:

5b2bbacb6f
2cefaba10e

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 4ef584697f1c9da53c2ab7a6511f9b009f43cf16
2020-06-22 14:46:21 -07:00
Pavel Aslanov
d91ca5004f remove HgPhase type
Summary: `HgPhase` type is redundant and was adding dependency on mercurial in phases crate.

Reviewed By: farnz

Differential Revision: D22162716

fbshipit-source-id: 1c21841d34897d0072ff6fe5e4ac89adddeb3c68
2020-06-22 13:51:33 -07:00
Durham Goode
a0f1169789 py3: fix test-fb-hgext-sampling.t
Summary: Now it passes

Reviewed By: quark-zju

Differential Revision: D22143037

fbshipit-source-id: 725269096d7f29872d945b9cbfceedfcfad4e459
2020-06-22 11:34:03 -07:00
Durham Goode
474877a124 py3: fix test-hook.t
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22145284

fbshipit-source-id: 235a0d4b75bd1bae402e61cf36f978a515190a8f
2020-06-22 11:29:42 -07:00
Durham Goode
d9be71caf7 py3: fix test-bookmarkstore.py
Summary: Easy fix

Reviewed By: quark-zju

Differential Revision: D22143857

fbshipit-source-id: c35e7121a2be4152da24d19615dc38d551011282
2020-06-22 11:29:41 -07:00
Durham Goode
96e6337e2a py3: fixes test-export-t.py
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22146555

fbshipit-source-id: 97b82a9dcd564a287e590940f6191456ca059868
2020-06-22 11:27:52 -07:00
Chad Austin
65e7a01d6f allow async subcmd run functions
Summary: In advance of peppering async everywhere, allow subcmd's run method to be async.

Reviewed By: genevievehelsel

Differential Revision: D21892187

fbshipit-source-id: f611faacf95649d8bb5588aeefc4546bd5f63984
2020-06-22 11:27:11 -07:00
svcscm
79672cf550 Updating submodules
Summary:
GitHub commits:

019c76a042
b9d387fc4f
c73a7e5439
7b0535c525
c06e288b52
c5957aaf11
89689ef8cf
6a5fdd1085
5ba53844dd
70f40cc1c2
d04e487182

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f68f464e1ae6ba2e8a74b71b3675b0c8feec986b
2020-06-22 09:40:27 -07:00
Stanislau Hlebik
8ff0c411cc mononoke: yield if we do a lot of skips in skiplist
Summary:
During expensive getbundle request traversing skiplist uses a lot of cpu, and
in fact it's blocking the whole CPU. krallin suggested to yield since it
should avoid blocking cpus, and that's what this diff is doing.

Reviewed By: krallin

Differential Revision: D22160477

fbshipit-source-id: 5bd881d5c50f4d8e64f2cc90389abc8568ec1df6
2020-06-22 09:20:40 -07:00
svcscm
d822685229 Updating submodules
Summary:
GitHub commits:

7f836bd96a
d8e75ec617
e4f13fcbfe
19c88ba5b6
4e6697fcb7
0c7db3e979
9a06a7e3aa
ad21747d1e
7a89fe5dcd
ba45108be6
b3b65054b3
6d24bb0b6a
9975095ca0

Reviewed By: zpao

fbshipit-source-id: 218d4590e76bf67941d551add7ea1b5541137998
2020-06-22 09:02:32 -07:00
Carolyn Busch
69e652b380 demanedimportpy3: fix demandimport for ipdb
Summary:
Fix error "AttributeError: module 'concurrent.futures' has no attribute
'_base'" when loading asyncio.base_futures module. There very well may be a more appropriate fix, but this allows ipdb python3 debugging.

Reviewed By: quark-zju

Differential Revision: D22144225

fbshipit-source-id: eb6a96f79c97e3bd40c1efd9fc75660d6fc372ea
2020-06-22 08:59:14 -07:00
Lukasz Piatkowski
e326cdb0bd GitHub Actions: fix running out of space on Ubuntu build workflow (#23)
Summary:
As per https://github.com/actions/virtual-environments/issues/709 there started to be some issies with Ubuntu envs running out of space. This should fix it.

Also our Cargo builds use a lot of space, changing them to be non-incremental and removing debug symbols keeps the build fast, but greatly reduces the disk space usage leaving us enough space on GitHub Actions virtual machines.
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/23

Reviewed By: farnz

Differential Revision: D22160020

Pulled By: lukaspiatkowski

fbshipit-source-id: c23393e310c15ebf5a18b80f0bb5f1f894d24849
2020-06-22 07:50:25 -07:00
Pavel Aslanov
f1749771f7 fix/rearange mononoke.blobrepo stats
Summary: move some stats from BlobRepo to BlobRepoHg

Reviewed By: farnz

Differential Revision: D22117927

fbshipit-source-id: 0f2b10874236798a4af2afb50b50d32cd1cbbcc6
2020-06-22 07:29:20 -07:00
Pavel Aslanov
d13768d768 move DangerousOverride into a separate crate blobrepo_override
Summary: DangerousOverride is moved into a separate crate. Not only it is usually not needed but it was introducing dependencies on mercurial crate.

Reviewed By: StanislavGlebik

Differential Revision: D22115015

fbshipit-source-id: c9646896f906ea54d11aa83a8fbd8490a5b115ea
2020-06-22 07:29:19 -07:00
Pavel Aslanov
704cf3a84c change blobrepo to be a wrapper around inner structure
Summary: This change will ensure that cloning blobrepo is cheap, even if someone adds field that is expensive to clone. Plus it will result in just one arc-clone instead of cloning all the fields one by one.

Reviewed By: mitrandir77

Differential Revision: D22114066

fbshipit-source-id: ca0c3c78033b4c74872da314a32deb37c05b70ca
2020-06-22 07:29:19 -07:00
Pavel Aslanov
371a3a5366 move Globalrev for mercurial_types to mononoke_types
Summary: Globalrev does not have any dependencies on mercurial so it can be moved to mononoke_types since it is used in BlobRepo

Reviewed By: StanislavGlebik

Differential Revision: D22092491

fbshipit-source-id: 1dded88eb2ace08e8c6c3673e2d50ae1fbb9850d
2020-06-22 07:29:19 -07:00
Pavel Aslanov
ea79e79538 move all mercurial content generation logic to blobrepo_hg
Summary: Move all mercurial changeset generation logic to `blobrepo_hg`. This is preliminary step is required to decouples BlobRepo from mercurial, and in later stages it will be moved to derived data infra once blobrepo is free of mercurial.

Reviewed By: StanislavGlebik

Differential Revision: D22089677

fbshipit-source-id: bca28dedda499f80899e729e4142e373d8bec0b8
2020-06-22 07:29:19 -07:00
Pavel Aslanov
6c1e575411 move HgMutationStore to attributes
Summary: move HgMutationStore to attributes, and all related methods to BlobRepoHg

Reviewed By: StanislavGlebik

Differential Revision: D22089657

fbshipit-source-id: 8fe87418ccb8a7ad43828758844bdbd73dc0573d
2020-06-22 07:29:19 -07:00
Pavel Aslanov
905c8b213e move Filenodes to BlobRepo::attributes
Summary: Move `Filenodes` to `BlobRepo::attributes` as it is mercurial specific.

Reviewed By: ikostia

Differential Revision: D21662418

fbshipit-source-id: 87648a3e6fd7382437424df3ee60e1e582b6b958
2020-06-22 07:29:19 -07:00
Pavel Aslanov
a1f5e45a5a BlobRepoHg extension trait.
Summary: This diff introduces `BlobRepoHg` extension trait for `BlobRepo` object. Which contains mercurial specific methods that were previously part of `BlobRepo`. This diff also stars moving some of the methods from BlobRepo to BlobRepoHg.

Reviewed By: ikostia

Differential Revision: D21659867

fbshipit-source-id: 1af992915a776f6f6e49b03e4156151741b2fca2
2020-06-22 07:29:19 -07:00
Pavel Aslanov
2a746920b6 make it possible to store arbitrary type in blobrepo with dependency on it
Summary:
This diff adds additional filed `BlobRepo::attributes`  which can store attributes of arbitrary type. This will help store opaque types inside blobrepo without creating dependency on a crate which contains type definition for this attribute. This diff also moves `BonsaiHgMapping` inside attributes set.
- This work will allow to move mercurial changeset generation logic to derive data infrastructure

Reviewed By: ikostia

Differential Revision: D21640438

fbshipit-source-id: 3abd912e7227738a73ea9b17aabdda72a33059aa
2020-06-22 07:29:19 -07:00
Lukas Piatkowski
6ebd409406 mononoke/integration tests: separate out facebook-specific code for running integration tests
Summary: Not all facebook-specific code was moved out of integration_runner_real.py, but removing part of the code that is left would made the code less readable, the rest of it will be removed while the integration_runner_real.py is made usable for OSS

Reviewed By: farnz

Differential Revision: D22114948

fbshipit-source-id: d9c532a6a9ea653de2b12cffc92fbf45826dad37
2020-06-22 06:36:12 -07:00
svcscm
b02ad187cf Updating submodules
Summary:
GitHub commits:

c3214dbf02
1c3ac7c359
6b1372accb
4cebf72258
1164f35cfb

Reviewed By: zpao

fbshipit-source-id: 3d01011b52ffab88532fb7864d35184dd53a9020
2020-06-22 03:30:47 -07:00
Alex Hornby
5e9223f633 mononoke: add link support to CountedBlobstore
Summary: Add link support to CountedBlobstore

Reviewed By: StanislavGlebik

Differential Revision: D22090644

fbshipit-source-id: 36dc5454f1ca12c91d0eac6e5059f554ac5cb352
2020-06-22 03:15:53 -07:00
Alex Hornby
1458abb967 mononoke: fix cacheblob test build
Summary: Fix cacheblob test build

Differential Revision: D22158585

fbshipit-source-id: 2b702203b52e8dbf04c6afce1b8b3795101f5043
2020-06-22 02:31:40 -07:00
Stanislau Hlebik
0b7493f2f4 mononoke: add support for performing a move in a stack of commits
Summary:
Previously perform_move was able to only create a single commit that moves all
files. However this commit can be very large and it can cause problems for
different sync jobs. Let's add a method that all the files in the stack of
commits rather than in a single commit.

Reviewed By: ikostia

Differential Revision: D22067851

fbshipit-source-id: aff4d01cd547eb98dd6f0c45704371724acee9fc
2020-06-22 00:48:09 -07:00
svcscm
a63acc3dfd Updating submodules
Summary:
GitHub commits:

9176c59192

Reviewed By: zpao

fbshipit-source-id: 50c43f75d17284464546a743aff15b0f782ab165
2020-06-22 00:48:09 -07:00
svcscm
f15c93358b Updating submodules
Summary:
GitHub commits:

613f6f5931
7769d874cc
d2be0ea8d2

Reviewed By: zpao

fbshipit-source-id: 52266ad561f6446ce8dcc557f86155c5da54ef2e
2020-06-21 10:25:41 -07:00
svcscm
fdde1589d7 Updating submodules
Summary:
GitHub commits:

c6d8c535a0

Reviewed By: zpao

fbshipit-source-id: 4cf5eed5349f343b83caa7c100caf6892a6855e4
2020-06-20 09:25:16 -07:00
Stanislau Hlebik
dc84f9741d mononoke: try to compress values if they above cachelib limit
Summary: If a value is above cachelib limit let's try to compress it.

Reviewed By: krallin

Differential Revision: D22139644

fbshipit-source-id: 9eb366e8ec94fe66529d27892a988b035989332a
2020-06-20 01:05:54 -07:00
svcscm
09c2e232f7 Updating submodules
Summary:
GitHub commits:

bd4d114d4a

Reviewed By: zpao

fbshipit-source-id: fa17055bc752b7bb7d1ca765e074f85d96b064a7
2020-06-20 00:41:54 -07:00
Ailin Zhang
cec1cf648c make ObjectStore manage a PID-fetchCounts map
Summary: This diff adds a PID-fetchCounts map to `ObjectStore` and makes `ObjectStore` update that map after every `didFetch`

Reviewed By: kmancini

Differential Revision: D22100413

fbshipit-source-id: 740342c7b4a453fe482344c2db9542381c3772e4
2020-06-19 21:07:49 -07:00