Commit Graph

62172 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
db28ca7f59 derived_data_utils: ratelimit backfilling
Summary:
The backfiller may read or write to the blobstore too quickly.  Apply QPS
limits to the backfill batch context to keep the read or write rate acceptable.

Reviewed By: ahornby

Differential Revision: D25371966

fbshipit-source-id: 276bf2dd428f7f66f7472aabd9e943eec5733afe
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
078efc6112 session: add convenience methods for read and write qps limits
Summary:
The common case of limiting blobstore rates using a leaky bucket rate limiter
is cumbersone to set up.  Create a convenience method to do it more easily.

Reviewed By: ahornby

Differential Revision: D25438685

fbshipit-source-id: 821eda7bd0ddf71f22378c1b23e66b6d3f6454e7
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
90dc6adb1c derived_data: buffer fetching of mapping batches
Summary:
When fetching many derived data mappings, the use of `FuturesUnordered` means
we may fetch many blobs concurrently, which may overload the blobstore.

Switch to using `buffered` to reduce the number of concurrent blob fetches.

Reviewed By: ahornby

Differential Revision: D25371965

fbshipit-source-id: 30417e86bc33defbb821f214a5520ab1b8a8c18c
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
615537ef10 backfill_derived_data: add batch-size option to control batch size
Summary:
Large batches with parallel derivation can cause problems in large repos.
Allow control of the batch size so that it can be reduced if needed.

Reviewed By: krallin

Differential Revision: D25401205

fbshipit-source-id: 88a76a7745c34e4e34bc9b3ea9228bd5dad857f6
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
96d8ce4ad2 derived_data: add option for parallel batch derivation
Summary:
Re-introduce parallel backfilling of changesets in a batch using `batch_derive`,
however keep it under the control of a flag, so we can enable or disable it as
necessary.

Reviewed By: ahornby

Differential Revision: D25401207

fbshipit-source-id: f9aeef3415be48fc03220c18fa547e05538ed479
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
73cdac45e3 derived_data: use new derived data configuration format
Summary:
Change derived data config to have "enabled" config and "backfilling" config.

The `Mapping` object has the responsibility of encapsulating the configuration options
for the derived data type.  Since it is only possible to obtain a `Mapping` from
appropriate configuration, ownership of a `Mapping` means derivation is permitted,
and so the `DeriveMode` enum is removed.

Most callers will use `BonsaiDerived::derive`, or a default `derived_data_utils` implementation
that requires the derived data to be enabled and configured on the repo.

Backfillers can additionally use `derived_data_utils_for_backfill` which will use the
`backfilling` configuration in preference to the default configuration.

Reviewed By: ahornby

Differential Revision: D25246317

fbshipit-source-id: 352fe6509572409bc3338dd43d157f34c73b9eac
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
05225bcf90 derived_data: make derivation options a parameter to derive_from_parents
Summary:
Currently, data derivation for types that have options (currrently unode
version and blame filesize limit) take the value of the option from the
repository configuration.

This is a side-effect, and means it's not possible to have data derivation
types with different configs active in the same repository (e.g. to
server unodes v1 while backfilling unodes v2).  To have data derivation
with different options, e.g. in tests, we must use `repo.dangerous_override`.

The first step to resolve this is to make the data derivation options a parameter.
Depending on the type of derived data, these options are passed into
`derive_from_parents` so that the right kind of derivation can happen.

The mapping is responsible for storing the options and providing it at the time
of derivation.  In this diff it just gets it from the repository config, the same
as was done previously.  In a future diff we will change this so that there
can be multiple configurations.

Reviewed By: krallin

Differential Revision: D25371967

fbshipit-source-id: 1cf4c06a4598fccbfa93367fc1f1c2fa00fd8235
2020-12-14 09:24:57 -08:00
Mark Juggurnauth-Thomas
64be2e8d87 derived_data_utils: take parameters by reference
Summary: Take the parameters to `derived_data_utils` and `derived_data_utils_unsafe` by reference.

Reviewed By: krallin

Differential Revision: D25371970

fbshipit-source-id: d260650c2398e33667e1bc5779fbabdff04f1f98
2020-12-14 09:24:57 -08:00
Mark Juggurnauth-Thomas
9e1b1448e6 derived_data: split BonsaiDerived trait
Summary:
The `BonsaiDerived` trait is split in two:

* The new `BonsaiDerivable` trait encapsulates the process of deriving the data, either
  a single item from its parents, or a batch.
* The `BonsaiDerived` trait is used only as an entry point for deriving with the default
  mapping and config.

This split will allow us to use `BonsaiDerivable` in batch backfilling with non-default
config, for example when backfilling a new version of a derived data type.

Reviewed By: krallin

Differential Revision: D25371964

fbshipit-source-id: 5874836bc06c18db306ada947a690658bf89723c
2020-12-14 09:24:57 -08:00
Mark Juggurnauth-Thomas
01251de9bb sync configerator thrift
Reviewed By: StanislavGlebik

Differential Revision: D25246318

fbshipit-source-id: fd97296e3540b43c72af00ab045c81c496e06728
2020-12-14 09:24:57 -08:00
svcscm
cdac45a862 Updating submodules
Summary:
GitHub commits:

83a939ac16
1a6e63e659
0b55ddf667
38d981a188
b943595389
751d6fa6df

Reviewed By: bigfootjon

fbshipit-source-id: 519ba4a5e967dff2c50332693e761cd8ba3c62d4
2020-12-14 08:55:59 -08:00
Kostia Balytskyi
2db894e581 wireproto: fix incorrect name in timefunction
Reviewed By: krallin

Differential Revision: D25531699

fbshipit-source-id: ed620a7f00351251d3670ed1ce43240a584e76cd
2020-12-14 07:57:46 -08:00
svcscm
0f2d5c420f Updating submodules
Summary:
GitHub commits:

1b805ef11d

Reviewed By: bigfootjon

fbshipit-source-id: b7fffe2fca7b0572d6b7b1709b56da7b92b71a3f
2020-12-14 06:59:59 -08:00
Durham Goode
2333b25e75 tests: fix rust store test on windows
Summary: Looks like the permissions are different there. Let's glob it out.

Reviewed By: singhsrb

Differential Revision: D25507359

fbshipit-source-id: 6a5c19e41879798b829d9b6e79eba3009249c20c
2020-12-14 06:53:24 -08:00
Jan Mazur
64de2b3abf git_types: remove unused dependency on old futures
Summary: as in the title

Reviewed By: krallin

Differential Revision: D25531446

fbshipit-source-id: afa4858f8f18182f206234e69b242c20a2af6b2a
2020-12-14 06:39:01 -08:00
svcscm
89a5c10726 Updating submodules
Summary:
GitHub commits:

e047e2dbf4
2f9b85e653
288ce65a0c
c748032a25
92313218fe
0ebaea34f8
5186b0a80e

Reviewed By: bigfootjon

fbshipit-source-id: 99bf9594d6a0c2a941ae8806d03875eebdc20bb7
2020-12-14 04:32:56 -08:00
generatedunixname89002005325677
9c5eaa7c81 Daily arc lint --take RUSTFMT
Reviewed By: zertosh

Differential Revision: D25527687

fbshipit-source-id: 25c98dcb607ec7f469099b68f432f3412ca9988e
2020-12-14 03:56:02 -08:00
svcscm
93a1534f33 Updating submodules
Summary:
GitHub commits:

ab42eb8fb9

Reviewed By: bigfootjon

fbshipit-source-id: b7319b31e128ec4fde56ddad280993dede38f652
2020-12-14 03:51:48 -08:00
Stanislau Hlebik
cbe07f0d17 infinitepush: select infinitepush path only for scratch bookmarks
Summary:
At the moment "hg pull -B bookmark" always fetches from infinitepush path even
if we do something like "hg pull -B master".

Let's fetch from infinitepush only if a bookmark matches scratch mather

Reviewed By: markbt

Differential Revision: D25460577

fbshipit-source-id: 6563dcd3423c6a7a70ea1c1f7acdaf5db5e21875
2020-12-13 23:48:22 -08:00
svcscm
7c7c575d35 Updating submodules
Summary:
GitHub commits:

331500c91c
1ed48ba19b
4b584f0f45

Reviewed By: bigfootjon

fbshipit-source-id: 00aee6db375e104665cb946acb810e5f12cac4c4
2020-12-13 17:56:05 -08:00
svcscm
bc8616c8f3 Updating submodules
Summary:
GitHub commits:

70ee1c0a54

Reviewed By: bigfootjon

fbshipit-source-id: 08a42ed386ab883ff6ce7e3ac90cb03d968a27a5
2020-12-13 06:23:13 -08:00
svcscm
ab49244149 Updating submodules
Summary:
GitHub commits:

7da96e9960

Reviewed By: bigfootjon

fbshipit-source-id: ede7f0637d3bd56f897cda53887b3be0bc120435
2020-12-12 05:48:56 -08:00
Chad Austin
64ca0c83c6 skip failing doctor tests on macOS
Summary: Two doctor tests don't pass on macOS, so disable them for now.

Reviewed By: genevievehelsel

Differential Revision: D25509814

fbshipit-source-id: c3fa92daefd4fda67335bdc66f56e35e94ae4e6a
2020-12-11 23:35:11 -08:00
svcscm
0910aace18 Updating submodules
Summary:
GitHub commits:

9718b18852

Reviewed By: bigfootjon

fbshipit-source-id: a4605af7fa8e7c11411df1698eb6f90eedfe8c96
2020-12-11 19:32:09 -08:00
Arun Kulshreshtha
f98273063a auth: make auth_for_url validate certs
Summary: Make the auth crate validate the user's certificate before returning it. This way we can catch invalid certs before trying to use them.

Reviewed By: sfilipco

Differential Revision: D25454687

fbshipit-source-id: ad253fb433310570c20f33dbd0d0bf11df21e966
2020-12-11 18:55:03 -08:00
Arun Kulshreshtha
a8a9fa3246 auth: add x509 module for validating certs
Summary: Add a new module that can parse X.509 certificates and detect common issues (e.g., the certificate is missing, corrupt, or expired). This should allow us to provide better UX around certificate errors.

Reviewed By: sfilipco

Differential Revision: D25440548

fbshipit-source-id: b7785fd17fa85f812fd38de09e79420f4e256065
2020-12-11 18:55:03 -08:00
svcscm
e3d6cc84af Updating submodules
Summary:
GitHub commits:

5ce67f1a9a

Reviewed By: bigfootjon

fbshipit-source-id: abd0843d73fce512e7eb24ac43530667752a9d3f
2020-12-11 18:55:03 -08:00
svcscm
f84bbdedd8 Updating submodules
Summary:
GitHub commits:

6873524ad0
9aea8d1374
b1bb2842c5
a52d8cd161
491779514e
e5877c914d
e5961899ce

Reviewed By: bigfootjon

fbshipit-source-id: a5001788673ca4945f0cbd2d370f5f0e6f8f4474
2020-12-11 17:46:42 -08:00
Jun Wu
ec7c0659c9 dag: relax trait bounds for AbstractNameDag
Summary: This makes it more flexible.

Reviewed By: kulshrax

Differential Revision: D24467604

fbshipit-source-id: 63023cf0dde2fb7eac592ac79008e4b7a62340c1
2020-12-11 17:03:37 -08:00
svcscm
8356f2d70f Updating submodules
Summary:
GitHub commits:

e209e4adc7
5b58f228f9

Reviewed By: bigfootjon

fbshipit-source-id: 56b9e87fa15fd061f38d878e2dc5a0ab0a4bdd4a
2020-12-11 16:12:49 -08:00
svcscm
ecb1dcac6f Updating submodules
Summary:
GitHub commits:

635281a085
b8b7d1234b

Reviewed By: bigfootjon

fbshipit-source-id: cd0ebc96cde34949d672566477d547493853b331
2020-12-11 16:12:49 -08:00
svcscm
e3cbe9570e Updating submodules
Summary:
GitHub commits:

a765b22aa6
529bf7b225
a9fa337276

Reviewed By: bigfootjon

fbshipit-source-id: c59855d9822f8d5806f6ff431dbf1edaa8d35075
2020-12-11 14:38:46 -08:00
Xavier Deguillard
88dcfa7bb3 utils: add an RcuPtr class
Summary:
RCU is a synchronization mechanism that allows for very fast reads, at the
expense of slower writes. This is achieved by having the reader sometimes
reading a stale pointer when concurrent to a write, at which point the writer
will delay reclaiming the old data to a later moment where it is known that no
reader can hold a pointer to the old data.

Doing that allows for the read operations to be significantly faster than using
a Synchronized lock. Folly's documentation claims a read lock/unlock of RCU
runs in ~4ns, while the same for Synchronized is ~26ns.

Due to the writers cost, RCU is perfectly suited for places where reads needs
to be as fast as possible, and writes are very infrequent. One typical example
is when caching an application's configuration, we can expect reading the
configuration values more frequently than it is being reloaded, and in the case
where the configuration mismatch, a stale configuration can be tolerated by the
application.

In EdenFS, we can use RCU on Windows to make sure that unmounting a repository
will wait on all the pending callbacks.

Reviewed By: kmancini

Differential Revision: D25351536

fbshipit-source-id: 050ca0337e67ae195f4f16062dddb60f584af692
2020-12-11 14:10:58 -08:00
svcscm
14a01675b4 Updating submodules
Summary:
GitHub commits:

7bc3b3946f
f0bada9d2e
7645bb73f7
b1ee191405
aca376d5f3

Reviewed By: bigfootjon

fbshipit-source-id: 3e00326f5ee68b1ccb20ce0c4356aad394bf0bb4
2020-12-11 14:01:33 -08:00
Pavel Aslanov
32585287f1 convert changeset creation to new type futures
Summary: Convert changeset creation to new type futures

Reviewed By: krallin

Differential Revision: D25430405

fbshipit-source-id: 64eb6dbc324846408e60c77e273c5d5edfd59318
2020-12-11 13:55:46 -08:00
Xavier Deguillard
49de273c77 revisionstore: handle redacted blob in LFS
Summary:
When a blob is redacted server side, the http code 410 is returned.
Unfortunately, that HTTP code wasn't supported and caused Mercurial to crash.
To fix this, we just need to store a placeholder when receiving this HTTP code
and simply return it up the stack when reading it.

Reviewed By: DurhamG

Differential Revision: D25433001

fbshipit-source-id: 66ec365fa2643bcf29e38b114ae1fc92aeaf1a7b
2020-12-11 12:28:38 -08:00
svcscm
adc868698f Updating submodules
Summary:
GitHub commits:

748534bbb5
63a4709c5c
a49c6be6d2
f1f5760d72
3d5114da47

Reviewed By: bigfootjon

fbshipit-source-id: 7f69abfc2b9515d431a99c8133213639f70a0f69
2020-12-11 11:43:35 -08:00
Zeyi (Rice) Fan
2fbf335e2a cli: add --json to eden du
Summary: OD team wants to be able to track disk usage of EdenFS. Adding this option so it can be easier to parse.

Reviewed By: kmancini

Differential Revision: D25442582

fbshipit-source-id: 235bb8ba4377894b31dad48229ecb8f241f070ff
2020-12-11 10:58:22 -08:00
svcscm
ffd05a353b Updating submodules
Summary:
GitHub commits:

280074969d
5e2a41e968
ff56425ed4
49000ebce3
2053c9723a

Reviewed By: bigfootjon

fbshipit-source-id: 7babe412cc3d1d05f6d9b80b40f4ece470a66244
2020-12-11 10:08:35 -08:00
Durham Goode
d7af02abb1 revisionstore: fix paths for local indexedlog
Summary:
There was a bug with local-data indexedlog storage where it
wasn't applying the appropriate suffix, so tree data was being stored in
.hg/store/indexedlogdatastore just like file data. Let's fix that and add a
test.

Reviewed By: quark-zju

Differential Revision: D25469917

fbshipit-source-id: 731252f924f9a8014867fc077a7ef10ac9870170
2020-12-11 06:58:27 -08:00
Jan Mazur
47dd7719f7 mononoke_types: remove dependency on old_futures
Summary: Just removing unused dependencies

Reviewed By: ahornby

Differential Revision: D25492832

fbshipit-source-id: 5c9ace2c9a333a4d74239a5d7d8dfb9fbe1c772e
2020-12-11 06:54:28 -08:00
svcscm
0e42501108 Updating submodules
Summary:
GitHub commits:

0219bf5eed

Reviewed By: bigfootjon

fbshipit-source-id: e33972d8b9f8ad995d1b6aba5264651dcaa8c26e
2020-12-11 05:50:47 -08:00
Lukasz Piatkowski
f9e981817b simplify env setting for all steps using GITHUB_ENV (#70)
Summary: Pull Request resolved: https://github.com/facebookexperimental/eden/pull/70

Reviewed By: mitrandir77

Differential Revision: D25474319

Pulled By: lukaspiatkowski

fbshipit-source-id: efa3a02c270b2fa44922de3c140b0b60bf11bf9e
2020-12-11 05:00:20 -08:00
Alex Hornby
fec3ef773c mononoke: introduce RepoRequirement enum to MononokeAppBuilder
Summary: Allows a binary to specify if the repo args are required on command line, and if so if OnlyOne of AtLeastOne is the requirement.

Reviewed By: farnz

Differential Revision: D25422757

fbshipit-source-id: 44d27c954bd1e0fa38b2d44c1c3b2eac3e50bd0c
2020-12-11 04:30:02 -08:00
Thomas Orozco
6cf130f41f mononoke/mononoke_api: make Repo and its new_test methods available to dependents
Summary:
This is useful to e.g. write tests in things that use mononoke_api (such as
edenapi): the test mode isn't transitive across crates. This also requires
making Repo itself public, since callers might reasonably want to create one.

I've also updated a few of the accessor methods that were `pub(crate)` given
that what we had right now seemed like it was kinda random: some things were
`pub(crate)`, others were just `pub`.

Reviewed By: markbt

Differential Revision: D25467624

fbshipit-source-id: 2279d4196e8dc0e7e1729239710d900b351be816
2020-12-11 03:47:18 -08:00
Alex Hornby
6186481782 mononoke: factor out repo name and id resolution in cmdlib
Summary: Factor out functions in preparation for change that uses them to optionally resolve multiple repos from cmdlib

Differential Revision: D25422754

fbshipit-source-id: e0bd33ae533b1450e7084d78bd1765148b71bc76
2020-12-11 01:36:06 -08:00
Alex Hornby
f2ca14b1bf mononoke: add hg derived data shortcut to walker node types
Summary: Could already specify "bonsai" useful to be able to pass "hg".

Reviewed By: farnz

Differential Revision: D25367322

fbshipit-source-id: aca6d22f98394af49e3d94d5fd533bc9a25a6869
2020-12-11 01:36:06 -08:00
Alex Hornby
946472a110 mononoke: make BlobConfig hashable
Summary:
This is useful for jobs running multiple repos as it can then open the blobstore as many times as there are storage configs rather than as many times as there are repos.

Used in a diff I'm working on to group repos by storage config in a HashMap when setting up the walker to scrub multiple repos from single process.

Reviewed By: farnz

Differential Revision: D25422758

fbshipit-source-id: 578799db63dcf0bce4a79fca9642651601f2deeb
2020-12-11 01:36:06 -08:00
Alex Hornby
22d77348cd mononoke: remove unnecessary static lifetime in walker constants
Summary: also makes ERROR_MSG a constant

Reviewed By: farnz

Differential Revision: D25422756

fbshipit-source-id: e2f2b9122e2b90c7cb07b7d64156055d55c8c653
2020-12-11 01:36:06 -08:00
svcscm
7843d6a790 Updating submodules
Summary:
GitHub commits:

c5d7abd5f1

Reviewed By: bigfootjon

fbshipit-source-id: 65d2fe600c46e54f4bf570a6c04671186a6f359c
2020-12-11 01:36:06 -08:00