Commit Graph

61758 Commits

Author SHA1 Message Date
Mateusz Kwapich
1cb9ad2aaf fix the construction of full_bundle2_content in dechunker
Summary:
Dechunker has a feature of saving entire dechunked bundle contents in memory
 this is used to save the raw bundles to manifold. Unitl now this feature worked
 properly when accesed via `Read` trait methods. When accessed via `BufRead`
 trait the logic that was collecting the read contents was skipped.

 This manifested in the saved infinitepush bundles being always trimmed to 4kb.

Reviewed By: markbt

Differential Revision: D25020371

fbshipit-source-id: c606c9fb116a1cd00ae7f4558a7249364faa9c13
2020-11-17 04:56:39 -08:00
Alex Hornby
802a217229 mononoke: add Blame to walker
Summary:
Add Blame to walker so that we can scrub it.

For public commits, if blame is requested we wait for blame to be derived before traversing unodes. This saves traversing the unode tree twice.

For non-public commits they are not expected to have blame, so for those we don't wait for blame to be derived before traversing unodes.

Reviewed By: farnz

Differential Revision: D24896243

fbshipit-source-id: 66226a8e47f115bcda62269ade63874e0fff4ba0
2020-11-17 03:53:33 -08:00
Alex Hornby
b6f2ef5c94 mononoke: consolidate public phase checks in the walker
Summary:
This change allows the walk steps to check the underlying WalkState's phase information to see if a changeset is public. Its exposed to the steps via Checker::is_public().

This saves repeat checks from the changeset phase from the bonsai_to_hg_mapping_step if the walk state already knows its public, and makes sure we are passing the get_phase ephemeral_derive flag from just one place (it should always be the opposite of enable_derive).

Reviewed By: farnz

Differential Revision: D24954837

fbshipit-source-id: b911d69837db8ef34fbe2c27f642d6819ea46908
2020-11-17 03:53:33 -08:00
Alex Hornby
094f51dadb mononoke: use auto_impl for Arc<trait> in walker
Summary: Removes some boiler plate

Reviewed By: farnz

Differential Revision: D24954836

fbshipit-source-id: dcd13affbfeae5027c74e29829c4838c86573f83
2020-11-17 03:53:33 -08:00
generatedunixname89002005325677
e0776a86ed Daily arc lint --take RUSTFMT
Reviewed By: ahornby

Differential Revision: D25018239

fbshipit-source-id: b07b444fc3076b1754a98b5dd1cc9b6026e0a0be
2020-11-17 03:49:35 -08:00
Saurabh Singh
44be130a9d phabricator: ensure retrieved landed commits are in the repository
Reviewed By: mitrandir77

Differential Revision: D24968246

fbshipit-source-id: 6b68f93986a1d91abc676ca94f59d4ee7d3d34de
2020-11-17 03:46:44 -08:00
Alex Hornby
5e24a70160 mononoke: delegate FromStr, AsRef and sampling_fingerprint from BlameId
Summary:
delegate FromStr, AsRef and sampling_fingerprint from BlameId to the
inner FileUnodeId

Reviewed By: markbt

Differential Revision: D24917140

fbshipit-source-id: 1f39b15c91c1f90f371baf03d97f03d00d8798ea
2020-11-17 01:28:34 -08:00
Alex Hornby
50bfe98ec2 mononoke: no need to pass storage-id in walker tests if its the repo default storage
Summary: Remove some boiler plate from tests

Reviewed By: markbt

Differential Revision: D24864067

fbshipit-source-id: b4729f1004fdd0164ca5394b1c9f850ef0c9f25f
2020-11-17 01:28:34 -08:00
Alex Hornby
8cbafc574b mononoke: shorten NodeType variant names in the walker
Summary:
The NodeTypes variants and the EdgeType variants generated from them were getting rather long which makes them hard to work with.

This change shortens them by
   - changing BonsaiChangeset* to Changeset (this also has better consistency with changeset its blobstore keys)
   - updating Bonsai*Mapping to *Mapping )except for BonsaiHgMapping where it disambiguates with HgBonsaiMapping)

Due to the way walker output is sorted it made more sense to do these in one diff rather than two.

Reviewed By: markbt

Differential Revision: D24864061

fbshipit-source-id: dbd395a89be828ac97cf056f03787097d8f1491d
2020-11-17 01:28:34 -08:00
svcscm
d99112b0a6 Updating submodules
Summary:
GitHub commits:

4ce16473dd
4f459135ac

Reviewed By: wittgenst

fbshipit-source-id: 5292ab8cc282045a37170fb2332b8bf42258ee82
2020-11-17 01:28:34 -08:00
svcscm
d0da020016 Updating submodules
Summary:
GitHub commits:

e7f34876f6
137bd84102
7e06aa2077
d4900c878a
9627e342c8
a30b49b914

Reviewed By: wittgenst

fbshipit-source-id: 7ac9bed4a4687c7af3cfb2634bc9c63cf81a142e
2020-11-16 21:26:27 -08:00
Xavier Deguillard
02ee056b71 inodes: make TraverseTest compile on Windows
Summary: The test wasn't compiling due to these 3 missing headers, add them.

Reviewed By: genevievehelsel

Differential Revision: D24997597

fbshipit-source-id: 6e3be0763362e41be138c670dc88a63bd9e88024
2020-11-16 16:25:22 -08:00
svcscm
e447f103b1 Updating submodules
Summary:
GitHub commits:

5ddb53b5f7
a2a858c9d4
438191e195
387e7db04a

Reviewed By: wittgenst

fbshipit-source-id: 4aa8c09db38743784f7d54ea8c28528b3bbeebc6
2020-11-16 16:25:22 -08:00
svcscm
fe3c3b1066 Updating submodules
Summary:
GitHub commits:

c1e64174b7
5ea5dc9b04
222043065a
cabc72fbe4

Reviewed By: wittgenst

fbshipit-source-id: 9e0828966c94042228ab83ac57d747a16d6277f1
2020-11-16 10:10:59 -08:00
Durham Goode
dacb852353 edenapi: make http version configurable
Summary:
We've seen some hangs with http 2 in lfs. Switching to http 1.1 seems
to fix it. Let's make this configurable so we can tweak this if we see it in
edenapi. For now we continue to default to http 2.

Reviewed By: krallin

Differential Revision: D24901201

fbshipit-source-id: 9806e2c37fa299e4bd381ebdcb17d00800408de3
2020-11-16 10:05:19 -08:00
Johan Schuijt-Li
ec414a7f86 add support for HTTP preamble
Summary:
To support the ability for Mercurial to talk to Mononoke directly while going
through an HTTP proxy, we need to be able to accept HTTP prefixed requests.
This adds the support for Mononoke side. Mercurial client will be added in
subsequent diff.

Reviewed By: krallin

Differential Revision: D24989335

fbshipit-source-id: 597eaa974cea661332967e34abc80b2b609b94ff
2020-11-16 09:12:05 -08:00
Xavier Deguillard
2b1d0a9483 inodes: rename the fuseRefcount in InodeMap
Summary:
This is a preparatory phase to make the refcount usuable on Windows. For more
details, see D24716801 (e50725d2cb)

Reviewed By: chadaustin

Differential Revision: D24764568

fbshipit-source-id: 1e8c6ab00d4c1ec79c347fd5ae7167b2ce1dff68
2020-11-16 09:03:18 -08:00
Xavier Deguillard
4038c01e9f utils: remove //eden/fs/utils/test:linux_test
Summary:
The skip_on_mode_mac argument to cpp_unittest doesn't exist on Windows, and to
be consistent with the rest of the code, we can simply ifdef the code that
either doesn't compile, or doesn't run.

Note: For some reason the accessIncrementsAccessCount test fails when running
on Windows, but only if running after accessAddsProcessToProcessNameCache...

Reviewed By: chadaustin

Differential Revision: D24496450

fbshipit-source-id: fe18fe1d791a27fbe4bd03bd3e8c811feeb23f5f
2020-11-16 08:29:04 -08:00
Xavier Deguillard
b733f70ec2 cli: fix eden debug modified alias
Summary:
This is what `eden debug` shows:
  modified (m, a, t, e, r, i, a, l, i, z, e, d)
                      Enumerate all potentially-modified inode paths

Reviewed By: chadaustin

Differential Revision: D24908570

fbshipit-source-id: 62e91b6f0212c70de4bb1705539d3674e6e000d9
2020-11-16 08:25:03 -08:00
Xavier Deguillard
932e7152fb service: fill the file size for debug file_stats on Windows
Summary:
On Windows, `eden debug file_stats` would crash due to the fileSize not being
filled. Since computing the file size is just a matter of calling stat(2) on
the file, let's simply do that.

Reviewed By: chadaustin

Differential Revision: D24908430

fbshipit-source-id: 07ffb97ada15a07565bea397b436fd21d09b5565
2020-11-16 08:25:03 -08:00
Thomas Orozco
fad04d1b02 mononoke/lfs_import_lib: update to futures 0.3 / tokio 0.2
Summary: Like it says in the title.

Reviewed By: ahornby

Differential Revision: D24918676

fbshipit-source-id: 041823d72fe0ba36262fd71b7ff5be5c42dae283
2020-11-16 04:27:17 -08:00
Stanislau Hlebik
7b3990c080 mononoke: add an option to check service identity in hgcli
Reviewed By: krallin

Differential Revision: D24786082

fbshipit-source-id: 7cd709d19490defb39fcebad08f95c00af54216c
2020-11-16 03:27:29 -08:00
Stanislau Hlebik
0dce99888f cmdutil: fix amending a reverted file
Summary:
We had a bug: if two files were reverted and then we try to amend one of them
mercurial will actually amend both of them.

Looks like the problem was caused by "Prune files reverted by amend" block.
Previously this block was considering every file that was changed in a commit we
are about to amend and comparing with working copy. If a file is the same in a
commit we are about to amend and in the working copy then it will amended as
well.

This diff attempts to fix it by considering only files that were selected for
amending.

Reviewed By: DurhamG

Differential Revision: D24949727

fbshipit-source-id: cf6cb95af3f67ec769e8a58db3b829945133b830
2020-11-16 02:58:24 -08:00
Stanislau Hlebik
daa28549c4 cmdutil - add a test that shows invalid amend behaviour
Summary:
We have an edge case - if we reverted two files and then we try to amend only a
single one  then both of them will be amended.

This diff adds a test for this and other edge-cases. The next diff will fix it

Reviewed By: DurhamG

Differential Revision: D24949726

fbshipit-source-id: c5c53de1d67f161efa8564f89127e61ac2f28ac9
2020-11-16 02:58:23 -08:00
Mark Juggurnauth-Thomas
4a123568d3 mononoke_types: store ChangesetId in frozen BonsaiChangesets
Summary:
`BonsaiChangesets` are immutable.  Rather than recomputing their changeset ids
every time (which involves cloning, serializing, and hashing the changeset),
instead store it alongside the changeset data, computing it once at the point
the changeset is frozen.

When loading the changeset, we already know the id, so there's no need to
compute it at all.

Reviewed By: farnz

Differential Revision: D24951230

fbshipit-source-id: 5350e94eb6ea799a89ced2a211baa657a06b83d0
2020-11-16 01:53:08 -08:00
svcscm
916c9774f2 Updating submodules
Summary:
GitHub commits:

b327138522
a698401e2b
eaa7c42440

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c744c2155f530aeb4f0938e45cad391d690507a1
2020-11-15 16:23:07 -08:00
svcscm
cee3a5784d Updating submodules
Summary:
GitHub commits:

aff76a39f5
8d3ba4fd5a
2b9c95237f
360e9190d8

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5eb37158ab4d43c5c01b4dfdb2daa9ac0e24ef59
2020-11-14 16:00:33 -08:00
Thomas Orozco
3a7014ed80 streamclone: send files that might be un-inlined soon first
Summary:
When we streamclone, we snapshot the revlogs under a lock, then we start
sending. That works fine, unless we have a file whose size changes during
the sending phase. This can happen if it's promoted from a single `.i` to a
`.i` and a `.d`.

When that happens, the clone fails (the client reports it received a bunch of
corrupted data because it starts interpreting parts of files as inputs). Since
the breakage is also confusing client side, I updated the server side to also
assert that it's sending what it thinks it's sending.

Reviewed By: DurhamG

Differential Revision: D24958885

fbshipit-source-id: a0349c651b7cb63ab27546adf9944e7fba63a95d
2020-11-14 08:02:21 -08:00
svcscm
f4e9f1c95c Updating submodules
Summary:
GitHub commits:

6b29295250

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 3960bf61b676a473789fb91785dab8eef2dcef87
2020-11-14 08:02:21 -08:00
svcscm
507fd5f180 Updating submodules
Summary:
GitHub commits:

bd48128e22
3e46a01b5d
575b36b5c8
7062f63712

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 8557b2a824a3a1800beb9c9fe56fa9b224fdf27c
2020-11-13 15:34:32 -08:00
Xavier Deguillard
27f08fc126 utils: remove ServiceAddress
Summary: This is unused, except in tests, so let's just remove it.

Reviewed By: chadaustin

Differential Revision: D24930011

fbshipit-source-id: cb132962e1dff9d12ce12e7eb75bd34a026c58b7
2020-11-13 15:19:38 -08:00
svcscm
d4aef93bad Updating submodules
Summary:
GitHub commits:

768b204f12
067e147382

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 160febddedf3575486e724abfc4c588bb90fecf3
2020-11-13 15:19:37 -08:00
svcscm
d69875cdfb Updating submodules
Summary:
GitHub commits:

d28f475cae
cfb8b1be23
a7a7940e71
7e012e8f4e
3f07673354
214dc0a1cd

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 3a25080f11536d479b7fdb73a2c5db0ff7ec31b2
2020-11-13 14:33:24 -08:00
Xavier Deguillard
8b82dc96cb prjfs: make readdir asynchronous
Summary:
As of right now, opendir is the expensive callbacks due to fetching the sizes
for all the files in a directory. This strategy however breaks down when
timeouts are added as very large directories would trigger the timeout, not
because EdenFS is having a hard time reaching Mononoke, but because of
bandwidth limitation.

To avoid this issue, we need to have a per-file timeout and thus makes opendir
just trigger the futures, but not wait on them. The waiting bit will happen
at readdir time which will also enable having a timeout per file.

The one drawback to this is that the ObjectFetchContext that is passed in by
opendir cannot live long enough to be used in the size future. For now, we can
use a null context, but a proper context will need to be passed in, in the
future.

Reviewed By: wez

Differential Revision: D24895089

fbshipit-source-id: e10ceae2f7c49b4a006b15a34f85d06a2863ae3a
2020-11-13 14:27:26 -08:00
svcscm
dca309c1e5 Updating submodules
Summary:
GitHub commits:

95d61e29df
0ca5262dc6
9b8c1eb7f9
04eafeb6f1
1aae41786a
ef77860a2f
6b5f792b42
441fd72296
84920f2679
bc70f0be9d
76fce83ee7
9b0131179f
e022b59047
0212cce374

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 47d908e7ebef6818fcd52386c60178fd502ad768
2020-11-13 13:57:54 -08:00
Katie Mancini
219a7ff280 Change Prefetch Profiles command name
Summary:
The rest of the non debug commands use - instead of _.

Lets flip the prefretch profiles cli to be consistant.

Reviewed By: genevievehelsel

Differential Revision: D24910172

fbshipit-source-id: a5f18a9c9d5fb4ef9417f14ef9d053cdc1599d76
2020-11-13 12:28:15 -08:00
Katie Mancini
e35c20640a Fix Prefetch Profile Summary
Summary:
The second line of the summary got cut off due to a bad multiline comment
signals_oops

Reviewed By: wez

Differential Revision: D24909886

fbshipit-source-id: 844778e7d47a2b7b413fdd0c4fa0ef71dec9dadb
2020-11-13 12:28:15 -08:00
Katie Mancini
a614382e09 Skip metadata prefetch in eden prefetch
Summary:
`eden prefetch` can trigger  a bunch of wasted network requests to fetch metadata
when we are fetching files anyways. (These network requests are wasted since we
fetch the file contents and most of them are being throttled on sandcastle anyways.)

So lets skip metadata prefetching during eden prefetches.

Reviewed By: genevievehelsel

Differential Revision: D24658066

fbshipit-source-id: f8a32807a4e238222158f100cdd5ffa1b92fd833
2020-11-13 11:51:39 -08:00
svcscm
8a314fb309 Updating submodules
Summary:
GitHub commits:

837a263e6a
e3d932649a
2dbc0e56f3

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 9dd1493200d76c4d08b214658eaf28dc0ecb192f
2020-11-13 09:47:11 -08:00
Alex Hornby
0bb5c7cc51 mononoke: fix walker build
Summary: Fix the walker build.  Had a land race on non-conflicting lines.

Reviewed By: farnz

Differential Revision: D24953152

fbshipit-source-id: b3d43d745242542ba1a6df9ba730460112bee6dc
2020-11-13 09:41:29 -08:00
svcscm
c74bc19bc9 Updating submodules
Summary:
GitHub commits:

c46ffd4579

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 35c38f6863a9e9d4610c4096bf94f92545bfe692
2020-11-13 09:41:29 -08:00
svcscm
e833660f5c Updating submodules
Summary:
GitHub commits:

bc7b4d8337
92a7805669

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 8f83ab7a8ea3e53aaaa7b64be3ced11d4d43c39c
2020-11-13 08:22:52 -08:00
Kostia Balytskyi
550c9ccbff unbundle: add file change-based rate limiting
Summary:
This diff makes it possible to rate limit public or infinitepush pushes for individual repos based on the total number of file changes across all commits accepted in the given sliding window.

## Why support infintiepush rate limiting?

We want to hit the same servers with infinitepush and public traffic, yet we want to avoid the situation when a spike in infinitepush pushes (like after a rebase of a huge codemod stack) makes our servers incapable of serving public writes.

## Why support public rate limiting?

I don't think there's any reason to do it, but it's essentially free, so why not.

## Why per repo rather than cumulative?

If we only rate-limit cumulative traffic, a single misbehaving repo can fill in the quota and prevent other repos from accepting any traffic even with small limits.

Reviewed By: mitrandir77

Differential Revision: D24871837

fbshipit-source-id: 6da36794b2fdddd70f1a54e0afeaa4c49065a98d
2020-11-13 08:09:50 -08:00
Alex Hornby
e417b1e361 mononoke: add step to UnodeFile parents
Summary: Step into history via UnodeFile parents to check they are valid

Reviewed By: markbt

Differential Revision: D24838456

fbshipit-source-id: 3b19973f9f7da6e502595b4ffa33a031e1df03ab
2020-11-13 05:25:59 -08:00
Alex Hornby
48a94f1795 mononoke: add step from UnodeFile to linked Bonsai Changeset
Summary: Check that the UnodeFile's link is good by stepping to it.

Reviewed By: markbt

Differential Revision: D24838458

fbshipit-source-id: c6c8ef5dc580bb591f484df659a76f0ba43a68e6
2020-11-13 05:25:59 -08:00
Alex Hornby
77d5b4d8e8 mononoke: add UnodeFile to walker graph
Summary: add UnodeFile to walker graph to completment UnodeManifest, along with edges from UnodeFile to FileContent

Reviewed By: ikostia

Differential Revision: D24838460

fbshipit-source-id: 4bc860a65c5489ba9b2bff4582967d9db6181f25
2020-11-13 05:25:59 -08:00
Alex Hornby
0f47fb897d mononoke: add edge from unode to linked bonsai changeset in walker
Summary: When doing a deep walk step into history via the unode's linked changeset.

Reviewed By: ikostia

Differential Revision: D24838459

fbshipit-source-id: cf2196f95e7b6bf3c3ba2cd1c44fef748a11597f
2020-11-13 05:25:59 -08:00
Alex Hornby
143e18ec2b mononoke: add UnodeManifest support to walker
Summary: add UnodeManifest support to walker so they can be scrubbed

Reviewed By: mitrandir77

Differential Revision: D24604174

fbshipit-source-id: c60a020802fae109005263393ea5618f22f21888
2020-11-13 05:25:59 -08:00
Alex Hornby
35b08aa298 mononoke: add bonsai to unode manifest mapping to the walker
Summary: Add bonsai to unode manifest mapping to the walker so we can scrub from bonsais

Reviewed By: mitrandir77

Differential Revision: D24604188

fbshipit-source-id: d98938c5ec640c479007b59163899c16d0e3fb9d
2020-11-13 05:25:59 -08:00
Alex Hornby
da3bdd3d8c mononoke: allow revisit of ChangesetInfo in walker if not derived yet
Summary:
Track ChangesetInfo derivation in the same way as Fsnode.  This fixes repeated visits to ChangesetInfo

As part of this the matching in WalkState::needs_visit is made exhaustive, as it the default match had previously been returning true for ChangesetInfo nodes.

Reviewed By: mitrandir77

Differential Revision: D24838455

fbshipit-source-id: 33b8201984b294a1560da104b2cc9c65849b9297
2020-11-13 05:25:59 -08:00