Commit Graph

67553 Commits

Author SHA1 Message Date
Gus Wynn
87a09132dc tokio -> 1.10
Reviewed By: dtolnay

Differential Revision: D30647831

fbshipit-source-id: 7094873ec5cfbf80cd7c3564fdd011268053b0d3
2021-08-30 15:55:16 -07:00
Genevieve Helsel
19e9cd2f7a allow specifying log path in eden debug log
Summary: Adds an option to print the path to the eden log file. Similar to `eden pid`, this can be used for shell one-liners.

Reviewed By: chadaustin

Differential Revision: D30558294

fbshipit-source-id: ca70addaef2093e10f0321bae0cff3b1bfc7dc75
2021-08-30 14:16:35 -07:00
Genevieve Helsel
fdb1fe42c6 turn eden debug logs upload into a flag
Summary: `eden debug log --upload` fits in better with the format of the other cli tools (rather than `eden debug log upload`)

Differential Revision: D30557691

fbshipit-source-id: 32e47e1487703560f2adb5f0f79f1002d29eea93
2021-08-30 14:16:35 -07:00
Durham Goode
0b0d631f3b pathmatcher: add native UnionMatcher
Summary:
In a previous diff we made sparse matchers become union matchers, since
they are a collection of each individual sparse profiles matcher. In order to
maintain the performance benefits of having sparse computations run on
non-python matchers, we need to update the matcher extractor to support union
matchers.

Reviewed By: quark-zju

Differential Revision: D30588256

fbshipit-source-id: 15014be844e1d713e19ae8f2959d947516b4e3c7
2021-08-30 11:47:07 -07:00
Durham Goode
690ab244da sparse: add version helper function
Summary:
We were copy/pasting metadata.get("version", "1") everywhere. Let's
make it a helper function.

Differential Revision: D30586162

fbshipit-source-id: ff6a9706f1970f84ffeb7de0e1362c3ba507fc00
2021-08-30 11:47:07 -07:00
Durham Goode
af11572e75 sparse: prevent v2 profiles from stepping on each other
Summary:
Sparse profiles should be roughly scoped around the files needed to
work on a certain product. If an engineer needs to work on multiple products
they should be able to enable multiple profiles.

Previously, multiple v2 profiles would be combined into an ordered list of
include/exclude rules, which meant that profiles enabled later could exclude
files included by the earlier profiles.

To fix this, let's treat each profile separately and create a matcher for each.
We then combine these into a union matcher, which means we're guaranteed to have
all the files that each profile specifies.

Differential Revision: D30586161

fbshipit-source-id: 2e04cfdba670ffce381a7c041706f315775ad7b0
2021-08-30 11:47:07 -07:00
Durham Goode
e14a32ade8 sparse: store profile on SparseConfig instead of profile name
Summary:
In a future diff we'll process sparse profiles differently at the
matcher creation level. To do so we need to expose the profile object to that
layer. Let's do it by storing the profile instead of just the profile name.

Differential Revision: D30586163

fbshipit-source-id: d90343b4101c43fbd838512289362aca7c3f816a
2021-08-30 11:47:07 -07:00
Jun Wu
b46cd66401 debugsegmentgraph: change level default to 0
Summary: Not every repo has non-empty level 3 segments.

Differential Revision: D30615947

fbshipit-source-id: 27e416ed17cc383dd5287127fc589dd6ccddcb7e
2021-08-30 11:03:30 -07:00
Jun Wu
39cc0769c1 debugsegmentgraph: vertex_name failure is not fatal
Summary:
With lazy changelog, it is possible that `vertex_name` is unable to translate
an id to name in non-async context. Do not treat it as errors.

Differential Revision: D30615948

fbshipit-source-id: 4e7abd77c6eb116db00e25489685563b7cf78a9c
2021-08-30 11:03:30 -07:00
Jun Wu
2b4788bcdc debugsegmentgraph: use shared .hg path
Summary: The segments is stored in the shared `.hg`, not in the local repo `.hg`.

Differential Revision: D30615949

fbshipit-source-id: 9d2b7c1ce245553a2df070b066429fbcead5d827
2021-08-30 11:03:30 -07:00
svcscm svcscm
aef50870a3 Updating submodules
Summary:
GitHub commits:

b6d9a3aefe
55851da180
8b82ead05f
9e0fb51041
4f0dff4a06

Reviewed By: wittgenst

fbshipit-source-id: 67bbb2adf8b4f5c88ff5ba3eefdd9ac4a72765c0
2021-08-30 01:17:29 -07:00
svcscm svcscm
caf43fca96 Updating submodules
Summary:
GitHub commits:

9dabbd5864

Reviewed By: wittgenst

fbshipit-source-id: 2ab90c63b68c48b0a3d0719d4929e7026179e8d9
2021-08-29 23:05:58 -07:00
svcscm svcscm
3cdfe093c7 Updating submodules
Summary:
GitHub commits:

640237b81e
2ab0b32679
7e831f2fe7
d500d8d253

Reviewed By: wittgenst

fbshipit-source-id: a61e222bccc0c6f783a0eec7de3e188fbca5c137
2021-08-28 22:40:53 -07:00
svcscm svcscm
aac4fc6fe9 Updating submodules
Summary:
GitHub commits:

c97167fb94

Reviewed By: wittgenst

fbshipit-source-id: 79a66d7082e8b15e14934fc3cf30d5f9f96d41aa
2021-08-28 22:03:58 -07:00
svcscm svcscm
e391b4a251 Updating submodules
Summary:
GitHub commits:

563deb4031
5c2f2d94cf
859e234c77
9fc61aa83f

Reviewed By: wittgenst

fbshipit-source-id: fd2ad3ccb2f6839e0d840c9d3b01716b712faf5b
2021-08-28 04:12:17 -07:00
svcscm svcscm
0b043382df Updating submodules
Summary:
GitHub commits:

004a893d92
6dabecbc9a
d12f35cae0
cc644ca8e2
b60bd1d149
c688abee44
e922280540

Reviewed By: wittgenst

fbshipit-source-id: ea58649434ac76ceaa2142edf6945c99e61fb8c2
2021-08-28 03:38:11 -07:00
svcscm svcscm
ac253a4449 Updating submodules
Summary:
GitHub commits:

e037ab9fc8
5dff5b904f
b6b5150aeb
e2aaaef8e8
d943aee954

Reviewed By: wittgenst

fbshipit-source-id: bc3ee9fa837bb970877554e434a80e009cea6dae
2021-08-28 03:25:55 -07:00
Xavier Deguillard
f79379aefc revisionstore: reduce lock scope in AuxStore
Summary:
Similarly to the previous diff, reducing the lock scope will improve
concurrency leading to higher performance in EdenFS.

Reviewed By: andll

Differential Revision: D30595787

fbshipit-source-id: 1d52e4a8d362f7e2e3e18c2a57a3ebb7628f549e
2021-08-28 03:25:54 -07:00
Xavier Deguillard
c9ee3b5209 revisionstore: reduce lock scope in IndexedLogHistoryStore
Summary:
Similarly to the previous diff, let's not hold any read/write locks when not
needed. This will improve concurrency of the code.

Reviewed By: andll

Differential Revision: D30595786

fbshipit-source-id: 6ea6c689e4deca713051a9f3611647334c528bc7
2021-08-28 03:25:54 -07:00
Xavier Deguillard
67a1666547 revisionstore: reduce indexedlogdatastore lock duration
Summary:
In the context of EdenFS, during a prefetch operation, EdenFS will call into
the revisionstore (via the backingstore) from multiple threads and use the
ContentStore::prefetch method in each of them with batches of keys.

Unfortunately, the IndexedLogDatastore lock is write held both when serializing
fetched data and when writing to the underlying IndexedLog. The serialization
part can be fairly CPU intensive as it will compress data with LZ4, but doesn't
require the lock to be held. If a concurrent get_missing call to the
IndexedLogDatastore is made, that will thus wait for the compression to
complete, reducing overall concurrency and fetching speed.

Reviewed By: andll

Differential Revision: D30583566

fbshipit-source-id: 06f5f4988c1bc911ae155189317232b54915a5cf
2021-08-28 03:25:54 -07:00
svcscm svcscm
cd265b0d53 Updating submodules
Summary:
GitHub commits:

d076a42d82
f14e794814

Reviewed By: wittgenst

fbshipit-source-id: 30b98149438aa594b4cbf08a46348d5a6baa083e
2021-08-27 17:56:59 -07:00
svcscm svcscm
3f8b3935ae Updating submodules
Summary:
GitHub commits:

b57d46bce8
12e2448255
84c3094fc0
3e2c79a479

Reviewed By: wittgenst

fbshipit-source-id: 84b2df38f971dbcafc07e2bf6dccfa0555eeae3e
2021-08-27 17:22:15 -07:00
svcscm svcscm
53dd538c3e Updating submodules
Summary:
GitHub commits:

4dec692b3a
8228fef363
a6a60e695e
56da25edb5
e8969643cc

Reviewed By: wittgenst

fbshipit-source-id: 87657ab0b6bd346c020e083cb893ff22d805db4e
2021-08-27 16:48:35 -07:00
svcscm svcscm
54d9552071 Updating submodules
Summary:
GitHub commits:

a495023f03
6c2bd28a61
e1036e1f1a

Reviewed By: wittgenst

fbshipit-source-id: 2dfeef2abc30cfe7e660d157c80cb686a338c8b4
2021-08-27 15:36:33 -07:00
Meyer Jacobs
44d6d6ce5b scmstore: update BackingStore to support scmstore
Summary: Add a new `BackingStore` implementation based on `scmstore` instead of `ContentStore` and allow the backend to be selected with the `scmstore.backingstore` config.

Reviewed By: andll

Differential Revision: D29672974

fbshipit-source-id: dc6b8662903bcfc941b586544aad487de6b8c956
2021-08-27 15:11:35 -07:00
Meyer Jacobs
85ebb18136 scmstore: introduce StoreValue trait
Summary: Introduce a new `StoreValue` trait, implemented for `StoreFile`, for use in `CommonFetchState`, which will be shared between `TreeStore` and `FileStore`.

Reviewed By: kulshrax

Differential Revision: D30295987

fbshipit-source-id: 862349980befa13cb3d420ee617e4fe5464d890a
2021-08-27 14:51:44 -07:00
Meyer Jacobs
13423a9ba0 scmstore: introduce StoreAttrs trait
Summary: Introduce a new `StoreAttrs` trait, implemented for `FileAttributes`, for use in `CommonFetchState`, which will be used by both `TreeStore` and `FileStore`.

Reviewed By: kulshrax

Differential Revision: D30295969

fbshipit-source-id: 603242fe08bea72035b1b1d0f37c46514e1fb92b
2021-08-27 14:51:44 -07:00
Meyer Jacobs
3663d5a706 scmstore: move FetchResults and FetchErrors to top level
Summary: Refactoring in preparation for updating `TreeStore` to match `FileStore`

Reviewed By: andll

Differential Revision: D30295957

fbshipit-source-id: 0f1677311eb2578d8e0dae12c07a1599edc3b500
2021-08-27 14:51:44 -07:00
Meyer Jacobs
d5ea0f5024 scmstore: rename FileStoreFetch to FetchResults and make it generic
Summary: Making `FetchResults` generic in preparation for using it with trees too.

Reviewed By: andll

Differential Revision: D30286592

fbshipit-source-id: a48cf2dbcdcc2c4b8a102eaa02ac465c367c6793
2021-08-27 14:51:43 -07:00
Meyer Jacobs
d66b308db5 scmstore: move file-specific metrics into separate module
Summary: I'll be adding metrics to the `TreeStore` soon, so I'm refactoring code that will be shared between files and trees. This change moves the non-file-specific metrics types up to the top-level `scmstore` module, rather than inside `scmstore::file`.

Reviewed By: andll

Differential Revision: D30284933

fbshipit-source-id: 31f48312bca8d75d4893220cd189b9735a37a5a0
2021-08-27 14:51:43 -07:00
Jun Wu
1875a663b1 metalog: add tracing logs
Summary: Helps figure out what happens to metalog internally.

Differential Revision: D30563249

fbshipit-source-id: 10323d36d762edda93206dd01c88d1f0d8abdf8d
2021-08-27 13:44:03 -07:00
Jun Wu
6aefe85ce8 util: replace faultinjection with failpoint
Summary:
The failpoint feature supports more complex injections, such as sleep, or fail
after a few times. There is no need to keep the adhoc faultinjection feature.

Differential Revision: D30495223

fbshipit-source-id: b5613811e489a5a52e9c0dd1ebf1096c848a402b
2021-08-27 13:44:03 -07:00
Zhengchao Liu
aa4566ece6 check hgcache before enqueue import tree request
Summary: Currently, tree imports are queued regardless of whether they are in the `hgcache`. This adds unnecessary delay, especially if the queue is busy (importer takes a long time and causes queue to backlog). This diff adds the logic to check if the tree is in `hgcache` before enqueuing a tree import request.

Reviewed By: xavierd

Differential Revision: D30514871

fbshipit-source-id: eb23f64b7f059832571f957fb67d18c3821d2844
2021-08-27 13:08:59 -07:00
Gus Wynn
6a75141b86 add panic-message
Summary:
this library is a more general version of the `panic_unpack` lib I
made in fbcode. I made this library, its mit-apache licensed

Reviewed By: dtolnay

Differential Revision: D30607308

fbshipit-source-id: ee4fad3924fdae021753055cd3fd88c99cb99512
2021-08-27 12:09:29 -07:00
svcscm svcscm
55169ae2fe Updating submodules
Summary:
GitHub commits:

ee858742fb
8c66c6946f
7c55aec077
ee3886f5d0

Reviewed By: wittgenst

fbshipit-source-id: 21211e28052e09e494bf6db8fb8d7fe892d044d1
2021-08-27 11:55:21 -07:00
Jun Wu
3562880804 pyfail: module to use FAILPOINTS in Python
Summary:
This allows us to insert FAILPOINTS in Python so we can use sleep, return error
etc.

Differential Revision: D30495224

fbshipit-source-id: aef56d03bc32eefb69573cfa586aa63a301edffc
2021-08-27 11:30:55 -07:00
svcscm svcscm
c25134d21a Updating submodules
Summary:
GitHub commits:

343444dfc2
46ae698125
180e836689
4c0bec69f8
f2a6ab7334

Reviewed By: wittgenst

fbshipit-source-id: 48e91afc4b69ecf096107c6ad59bb3b07677106f
2021-08-27 11:23:37 -07:00
Jan Mazur
fa742950a3 remove need for repo_name in hooks configerator config
Summary:
I abandoned D30603353 in favor of this one because
its_cleaner

We don't need repo name in every hook, just 2 of them.

This will allow us to have predefined, named hook configs that are repo-agnostic. E.g. when repositories are similar, they could share one set of hook configs in configerator.
There were two hooks that had repo_name in configerator hook config: verify_integrity and verify_reviewed_by

Reviewed By: StanislavGlebik

Differential Revision: D30605229

fbshipit-source-id: c310b16b564808d0dc0909d21cc3521a57e06fad
2021-08-27 10:45:32 -07:00
svcscm svcscm
21696b49e0 Updating submodules
Summary:
GitHub commits:

70be2d8ff7

Reviewed By: wittgenst

fbshipit-source-id: 8c5dafe02ba92a4cbe960aca399fb7b8457f1f9d
2021-08-27 10:40:34 -07:00
Durham Goode
86dd972294 tests: remove test-perftrace.t
Summary: The result is too flakey now that we've introduced threading.

Reviewed By: andll

Differential Revision: D30607733

fbshipit-source-id: f8bfa2a57d427731fb4ac3011f4364190a83b771
2021-08-27 10:19:05 -07:00
svcscm svcscm
b86a8a6b46 Updating submodules
Summary:
GitHub commits:

6a9e5e40df
493dd9e9fc
a24a90588f
58ca827f96
da0a04aace

Reviewed By: wittgenst

fbshipit-source-id: 06bac946edc31df7f6310a7ae02831c93af0970b
2021-08-27 10:11:34 -07:00
Xavier Deguillard
49619add41 store: allow extracting a slice of the Hash stored in HgProxyHash
Summary:
Some code in the HgDatapackStore is overly complicated due to the fact that
revHash returns a owned Hash and this forces the code to thus copy it onto a
temporary vector. By having a method that can directly return a slice to the
hash, this issue disappears, thus let's add it.

Reviewed By: chadaustin

Differential Revision: D30582458

fbshipit-source-id: dc102117bc82ab72378293c0abfe9acfd862e9e6
2021-08-27 10:05:48 -07:00
svcscm svcscm
c411f6b0f8 Updating submodules
Summary:
GitHub commits:

93eef59e56

Reviewed By: wittgenst

fbshipit-source-id: 80deff92581c59c9354f260d44a8007961246d34
2021-08-27 09:39:06 -07:00
Michael Samoylenko
d972c278ce Rm deprecated mysql connection factory
Summary: Cleaned up all remaining usages of this deprecated API in CTP codebase

Differential Revision: D30517771

fbshipit-source-id: 6b2c7fb6c569bf5a928a7eec60fdd890baad312f
2021-08-27 06:06:30 -07:00
Stanislau Hlebik
cf0380dccb mononoke: fix handling of mutable renames in fastlog
Summary:
Handling of mutable renames was incorrect for two reasons:
1) We didn't add an entry to history graph, so only a single changeset before
rename was returned. That was easy to "fix" (just add a new entry to history
graph), but...
2) ...all history operations now have to use a different path (the source of
the rename path).

To fix it let's track not just the changeset id, but also the path for the
given changeset id. Since the path can potentially be large I wrapped it into
Arc to avoid expensive clones.

Differential Revision: D30576342

fbshipit-source-id: a99f6269c34b0a0c626104ec47c9392f984328fb
2021-08-27 05:58:31 -07:00
Yan Soares Couto
475ebe8c17 Use fetch_snapshot endpoint from restore command
Summary:
This diff calls the `/:repo/snapshot` EdenApi endpoint added on D30514854 (ab17c4d181) from the `hg snapshot restore` command.

For now, it just prints the parent of the snapshot, but in next diffs it will update to it and restore the dirty changes.

Reviewed By: StanislavGlebik

Differential Revision: D30517984

fbshipit-source-id: e1381eaed561a7184ee02ab99d0282f11a1d944f
2021-08-27 03:40:57 -07:00
Yan Soares Couto
5e34a79748 Add bindings for fetch_snapshot endpoint
Summary: This diff adds the `fetch_snapshot` method to the EdenApi trait, implements it for talking with the EdenApi service, and also adds python bindings for ease of use from python.

Reviewed By: StanislavGlebik

Differential Revision: D30517973

fbshipit-source-id: 41c24ba25040b397b7d739c2885a47acfb9100d2
2021-08-27 03:40:57 -07:00
svcscm svcscm
981614c82b Updating submodules
Summary:
GitHub commits:

90bd25d7c6
327a7c3f63
91f45fe1a8
130b5a0883

Reviewed By: wittgenst

fbshipit-source-id: 7dfef20bbdfdb951f134c951b0644b38b774c6c0
2021-08-26 21:44:23 -07:00
svcscm svcscm
9e3f2aa667 Updating submodules
Summary:
GitHub commits:

f09819cfc1
63ae4d9f95
d1067ec2f2
e4f1e4b22a

Reviewed By: wittgenst

fbshipit-source-id: 3bb064420eb60dc7632ec13bceaf6eff5669023b
2021-08-26 21:35:25 -07:00
svcscm svcscm
7936baaa5a Updating submodules
Summary:
GitHub commits:

90bd25d7c6
327a7c3f63
91f45fe1a8
130b5a0883

Reviewed By: wittgenst

fbshipit-source-id: f7eeac855faed993f9f263d4a1a7bf8bce3d3cbe
2021-08-26 21:14:16 -07:00