Commit Graph

67734 Commits

Author SHA1 Message Date
Jun Wu
b13579fdf9 revlogindex: extend ParentRevs to support more than 2 parents
Summary:
Extend the struct so we can support more than 2 parents.

The size of the sturct is now 16 bytes, from 8 bytes. This might have some
performance overhead.

Not using `Box<[u8]>` because that will make the struct 24 bytes.

Reviewed By: StanislavGlebik

Differential Revision: D30686451

fbshipit-source-id: c0f8d0472c7e578f34d771dacecffc91585650c3
2021-09-01 09:25:33 -07:00
Jun Wu
260c97cb09 dag: avoid remote lookup in one more case
Summary:
In `vertex_id_with_max_group(name, group)`, if `group` is master and the `name`
exists in the non-master group, then there is no need to lookup remotely because
a same name (vertex) cannot be present in both master and non-master group. In
that case, just return that the `name` does not exist in the master group.

Reviewed By: StanislavGlebik

Differential Revision: D30699215

fbshipit-source-id: 5170abe719aa7cc31533912e18bc0e21f133e1f4
2021-09-01 09:25:33 -07:00
Jun Wu
c713ce098b dag: add test of suboptimal flush reassignment with lazy graph
Summary:
Added a test about excessive remote lookups when flush() reassigns vertexes
from non-master to master.

Reviewed By: StanislavGlebik

Differential Revision: D30699214

fbshipit-source-id: 0547707764855ab9a563178740612b54df4a5fc9
2021-09-01 09:25:33 -07:00
Jun Wu
77b3a82755 dag: add more tracing logs
Summary: They are used to narrow down issues related to S242328.

Reviewed By: StanislavGlebik

Differential Revision: D30699216

fbshipit-source-id: 28f4f0bfadadb2dea5510878168c2d7b47a8641c
2021-09-01 09:25:33 -07:00
Arun Kulshreshtha
550ee2eafa http-client: add RequestInfo struct
Summary: Split out the request ID, URL, and HTTP method from `RequestContext` into a new `RequestInfo` struct, which can be cheaply cloned and included in the response returned to the caller. This enables the caller to correlate requests and responses, which is useful when working with many concurrent requests.

Reviewed By: DurhamG

Differential Revision: D30650365

fbshipit-source-id: 68efedcf852c91387450443ebe46062809633f10
2021-08-31 22:29:39 -07:00
Jun Wu
095232f7a8 pydag: export CheckIntegrity methods to Python
Summary:
Make it possible to call the CheckIntegrity APIs from Python such as:

  In [1]: cl.inner.checkuniversalids()
  Out[1]: []

  In [2]: cl.inner.checksegments()
  Out[2]: []

  In [3]: cl.inner.checkisomorphicgraph(cl.inner, cl.dageval(lambda: heads(mastergroup())))
  # take a while
  Out[3]: []

Reviewed By: andll

Differential Revision: D30682536

fbshipit-source-id: 23f280bf261def3d20d5f7dc15a48c2fc2d79d77
2021-08-31 21:26:47 -07:00
Jun Wu
41ef5198f5 hgcommits: delegate CheckIntegrity to inner structs
Summary: Expose CheckIntegrity features from segmented changelog.

Reviewed By: andll

Differential Revision: D30682538

fbshipit-source-id: 382c50719f7176f299c15d16ddaae3783cbae265
2021-08-31 21:26:47 -07:00
Jun Wu
4d4afdd72a dag: add delegate support for CheckIntegrity
Summary: This makes other crates easier to implement CheckIntegrity.

Reviewed By: andll

Differential Revision: D30682540

fbshipit-source-id: 4333f37fa7bafe55a8bee9f149b2f23a463c51af
2021-08-31 21:26:46 -07:00
Jun Wu
71a676472c revlogindex: impl dummy integrity checks for revlog
Summary:
Makes the revlog index provides dummy graph integrity checks so it can
be used as a generic object in the Python bindings.

Reviewed By: andll

Differential Revision: D30682542

fbshipit-source-id: 25c6e8640de46188d7bf45a927e11e0779a8ad40
2021-08-31 21:26:46 -07:00
Jun Wu
5bcfb8cda0 dag: impl check_isomorphic_graph for NameDag
Summary: Make it possible to check a graph against a reference graph.

Reviewed By: andll

Differential Revision: D30682539

fbshipit-source-id: 57db952dcda5656ff6000e9961448c9b64afbaf0
2021-08-31 21:26:46 -07:00
Jun Wu
2cc0389e8b dag: add static lifetime bound
Summary: Required to make the upcoming changes compile.

Reviewed By: andll

Differential Revision: D30682541

fbshipit-source-id: 3ed4cf4718a906638cba2ab4efce2e3ea5f11fee
2021-08-31 21:26:46 -07:00
Jun Wu
08efd9d167 dag: impl check_segments for NameDag
Summary: Make it possible to check segment integrity.

Reviewed By: andll

Differential Revision: D30644243

fbshipit-source-id: 24bb0c8c8c9394d688e3e9320e59268bc2a4ed3f
2021-08-31 21:26:46 -07:00
Jun Wu
fe0562eaec dag: impl check_universal_ids for NameDag
Summary: Make it possible to check universal ids externally.

Reviewed By: andll

Differential Revision: D30644242

fbshipit-source-id: f312ff59dbdf68e57c5249d57c5d44da0b10e398
2021-08-31 21:26:46 -07:00
Jun Wu
28721b23e3 dag: impl blank integrity check for NameDag
Summary: Blank code for implementing integrity check for NameDag.

Reviewed By: andll

Differential Revision: D30644245

fbshipit-source-id: 22b030893dda0f0ac4c1b3707e39a520b1f6e718
2021-08-31 21:26:46 -07:00
Jun Wu
91195dcb76 dag: define graph integrity check functions
Summary: This will be used to verify graph integrity later.

Reviewed By: andll

Differential Revision: D30644244

fbshipit-source-id: 0d22b70121da37c411adf17200a6c752fefa80ad
2021-08-31 21:26:46 -07:00
Genevieve Helsel
f90a988fb2 use HiveLogger in EdenLogviewWriter
Differential Revision: D29568132

fbshipit-source-id: a1ef159bfbb5ebacb50274ab68a1585a684e53c9
2021-08-31 17:28:23 -07:00
Zeyi (Rice) Fan
949f565aab Back out "generate Cargo.toml"
Reviewed By: genevievehelsel

Differential Revision: D30679584

fbshipit-source-id: 025ea455c51b5a485cc61abf405e7c06380093fd
2021-08-31 15:25:20 -07:00
Zeyi (Rice) Fan
79517ec184 generate Cargo.toml
Differential Revision: D30670348

fbshipit-source-id: 74655c060cdc584c63e334a22e169705878329b7
2021-08-31 12:28:09 -07:00
Simon Farnsworth
4d12f542a3 All rules for a treematcher must be typed
Summary: This breaks all use of `hg sparse`, because `.hg*` cannot be matched.

Reviewed By: mitrandir77

Differential Revision: D30666349

fbshipit-source-id: c06d1b798a57490f2e5560f178a2839ae5425146
2021-08-31 09:39:31 -07:00
Zeyi (Rice) Fan
0d53c14f66 temporarily remove existing Cargo.toml
Differential Revision: D30670349

fbshipit-source-id: 872f847a01ac6e2ff5dd21c5bd7f4a7aa563a494
2021-08-31 09:34:46 -07:00
Alex Hornby
f15eff2116 mononoke: introduce ManifoldOptions struct
Summary: We've got multiple manifold parameters now, two of which are Option<i64>, so lets create a struct to name them

Reviewed By: HarveyHunt

Differential Revision: D30305462

fbshipit-source-id: 44eee00d478e4485d074a14fcccec2f0f9572ecd
2021-08-31 09:34:46 -07:00
Mateusz Kwapich
a57cfdf804 include the program name in the error message
Summary:
This allows to quickly identify the program that emitted the error.

Per user feedback: https://fb.workplace.com/groups/clifoundation/posts/433922134631466

Reviewed By: StanislavGlebik

Differential Revision: D30604611

fbshipit-source-id: 712bc9f466c5a7b5c97a1b83a10fbe277341a300
2021-08-31 02:32:46 -07:00
svcscm svcscm
3f0baf2d82 Updating submodules
Summary:
GitHub commits:

b765365df4

Reviewed By: yns88

fbshipit-source-id: f2017902fd388fb299b4449739bdba925d320168
2021-08-30 23:53:53 -07:00
Genevieve Helsel
c101e56dec add json option to version
Reviewed By: chadaustin

Differential Revision: D30555962

fbshipit-source-id: 50cf7afa0f30242a5d28b112bae04793e9b55ceb
2021-08-30 22:12:15 -07:00
svcscm svcscm
572422a1be Updating submodules
Summary:
GitHub commits:

4ef412fe8f

Reviewed By: yns88

fbshipit-source-id: de7095b06896f9e3df8ab89564b04129588c0065
2021-08-30 21:59:40 -07:00
David Tolnay
ba87c55127 third-party/rust: Patch mockall_derive to fix nondeterminism failures in Conveyor
Summary:
The mockall crate's `automock` attribute previously created nondeterministic output, which leads to frequent random "Found possibly newer version of crate" failures in Buck builds that involve cache.

The affected trait in Conveyor is:

https://www.internalfb.com/code/fbsource/[4753807291f7275a061d67cead04ea12e7b38ae2]/fbcode/conveyor/common/just_knobs/src/lib.rs?lines=13-23

which has a method with two lifetime parameters. Mockall's generated code shuffled them in random order due to emitting the lifetimes in HashSet order. The generated code would randomly contain one of these two types:

`Box<dyn for<'b, 'a> FnMut(&str, Option<&'a str>, Option<&'b str>) -> Result<bool> + Send>`

`Box<dyn for<'a, 'b> FnMut(&str, Option<&'a str>, Option<&'b str>) -> Result<bool> + Send>`

Reviewed By: jsgf

Differential Revision: D30656936

fbshipit-source-id: c1a251774333d7a4001a7492c1995efd84ff22e5
2021-08-30 21:12:18 -07:00
svcscm svcscm
80c72b8022 Updating submodules
Summary:
GitHub commits:

8b99814897
974c793bad
ec9f52ece6
40c891a8c7
b3c0679b7b

Reviewed By: yns88

fbshipit-source-id: 5b8b3f4a12ac87efd996d94c80b590522f2d0b23
2021-08-30 19:55:16 -07:00
Zhengchao Liu
f2eb6aee68 fix thread safety issues in ActivityRecorder CLI
Summary:
This addressed 2 thread safety issues:
1. holding strong reference to `EdenMount`
2. converting unowned `stringPiece` to `std::string`

Reviewed By: chadaustin

Differential Revision: D30657955

fbshipit-source-id: 870e972d9e0fe3897e021aeca77bf2db8c5fbb20
2021-08-30 19:30:08 -07:00
svcscm svcscm
3959dde762 Updating submodules
Summary:
GitHub commits:

814deed62d

Reviewed By: yns88

fbshipit-source-id: b49e2dc32d495138ef5188c1e41d0d9b2b5471be
2021-08-30 19:16:07 -07:00
svcscm svcscm
aa2e0d52fa Updating submodules
Summary:
GitHub commits:

0202b9f9ed
821c13e155
7fff1647e9
5afe34265f
ca94237add

Reviewed By: yns88

fbshipit-source-id: 325264746b00140dd9dcc9e34902e722fd2305ec
2021-08-30 17:17:04 -07:00
svcscm svcscm
1633c95d6e Updating submodules
Summary:
GitHub commits:

7798c9a27f
6fdd37cf45
13ded69484
5e87fcab7d

Reviewed By: yns88

fbshipit-source-id: a49c1093864acc5f6bd7dffdc713969490effa6f
2021-08-30 16:43:24 -07:00
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