Commit Graph

57885 Commits

Author SHA1 Message Date
Harvey Hunt
45714159c5 mononoke: Fix sampling of scrub_get
Summary:
D21573455 accidentally removed the scuba sampling for scrub_get
operations. Add this back in.

Reviewed By: StanislavGlebik

Differential Revision: D21638972

fbshipit-source-id: eee66dbce161de69246f4da0a15dc2cf00e1ba01
2020-05-19 05:44:43 -07:00
Stanislau Hlebik
e30a12ce58 mononoke: remove getfiles from traffic replay
Reviewed By: farnz

Differential Revision: D21622533

fbshipit-source-id: 3225e287df42c1bac8ad8f67cdb05ec33f27dfdd
2020-05-19 04:43:01 -07:00
Stanislau Hlebik
37437ebe60 mononoke: remove getfiles wireproto parsing
Reviewed By: farnz

Differential Revision: D21623155

fbshipit-source-id: b1f763b653c47c42bc1d765cfa8985a767a63652
2020-05-19 04:43:00 -07:00
Stanislau Hlebik
a5dcef86b1 mononoke: remove getfiles serialization
Summary: No longer needed!

Reviewed By: farnz

Differential Revision: D21623157

fbshipit-source-id: 8d033a61b8dd4c3ec990928e2921f9b46cbbdb94
2020-05-19 04:43:00 -07:00
Stanislau Hlebik
daa1162e08 mononoke: remove getfiles from ratelimiter and perf counter
Summary:
See bottom diff in the stack for the motivation. Though you can probably guess
the motivation :)

Reviewed By: farnz

Differential Revision: D21623154

fbshipit-source-id: a0940d766a67080ddcb346c2e3313eb08699edad
2020-05-19 04:43:00 -07:00
Stanislau Hlebik
aadecbf087 mononoke: remove getfiles from repo_client
Summary: First diff in the stack that removes getfiles since it's no longer needed.

Reviewed By: farnz

Differential Revision: D21623156

fbshipit-source-id: 44f310ec4e4f34845cc5bf1738f1a8ece14e6694
2020-05-19 02:02:23 -07:00
svcscm
c44cc1e6e4 Updating submodules
Summary:
GitHub commits:

bdd6a3a5cc

Reviewed By: wittgenst

fbshipit-source-id: 810add3221725dc7e0f601409ff5bd7bb8a3acfb
2020-05-19 02:02:23 -07:00
svcscm
28ff9b83a5 Updating submodules
Summary:
GitHub commits:

509ab86b8a
24b8d3e01c
ada700b906

Reviewed By: wittgenst

fbshipit-source-id: 053c53b2a5afe3b09b9982da63358b292a88e8c8
2020-05-18 19:26:55 -07:00
Jun Wu
88a9982eb6 hgcommands: make version a native command
Reviewed By: DurhamG

Differential Revision: D19803761

fbshipit-source-id: 32f77cc667375e537e1ff70316329251359ae6ed
2020-05-18 18:50:42 -07:00
Jun Wu
c2869d6ca9 remotefilelog: call setuprepo unconditionally in clone_shallow -> pull_shallow
Summary:
Before this change, pull_shallow only calls setuprepo if the remotefilelog
requirement is not in repo. With D21011401, the remotefilelog requirement
will be added by clone.py and pull_shallow can skip calling setuprepo, causing
the pull code paths to write file logs (and fail).

Change the pull_shallow to always call `setuprepo` to solve the issue.

The final fix is probably moving more remotefilelog related clone logic to core.
Right now I just did the minimal change to fix things.

Reviewed By: sfilipco

Differential Revision: D21632429

fbshipit-source-id: 17775ac0df18cda10247419b40f9c27436b22606
2020-05-18 17:52:34 -07:00
svcscm
acfa7f4291 Updating submodules
Summary:
GitHub commits:

e05a737c18
d3b7867ab4
30bff94e85

Reviewed By: wittgenst

fbshipit-source-id: 7c89711e394c8cc9ee4ee934e1bf2af7fcbb705a
2020-05-18 17:52:34 -07:00
svcscm
8cb4f39bc5 Updating submodules
Summary:
GitHub commits:

d67d568565
6472821406
10a3d74cc4
10957464df
b2ab01c578
06943d59da
218b463647

Reviewed By: wittgenst

fbshipit-source-id: af0d8f75f6ee6ac9e67812fcd6206070f74f3f49
2020-05-18 15:02:08 -07:00
Xavier Deguillard
97a90e7de9 revisionstore: add doc comment
Summary:
We didn't have a high level overview of the types and traits and their
purposes, add that.

Reviewed By: DurhamG

Differential Revision: D21599759

fbshipit-source-id: 18e8d23ed00134f9d662778eddaee4a9451f7c2c
2020-05-18 12:11:52 -07:00
svcscm
a9734869fe Updating submodules
Summary:
GitHub commits:

08763d6583
b2c842281f
474a2bde70
f732967c40
b9d65f5aa6
64c5a2a73e
49f42386a9

Reviewed By: wittgenst

fbshipit-source-id: 1cb968b6411cb414b0ce38ff6ba4a7d5bf4b28cf
2020-05-18 11:24:37 -07:00
Genevieve Helsel
c8402345af redirect PrivHelper stdin to /dev/null to fully daemonize
Summary: EdenFS doesnt daemonize correctly due to the privhelper not closing fd 0 (see http://www.faqs.org/faqs/unix-faq/programmer/faq/). This redirects stdin to /dev/null/ in order to do so.

Reviewed By: xavierd

Differential Revision: D21602545

fbshipit-source-id: 0aeb589efbf214ef22c0db039fbb6a436a71e360
2020-05-18 10:11:18 -07:00
Katie Mancini
76204197c0 fix use of service identity in scs CAT authentication
Summary:
This updates a placeholder in the authentication process for requests
in the rust thrift services to allow authentication with CATs. This change
allows for passing in a configurable server identity to be used as the
verifier identity here.

Additionally this sets the verifer identity to be "scm_service_identity"
for the mononoke scs server (the service identity for this service).

This is needed to use the mononoke scs server from corp.

Reviewed By: markbt

Differential Revision: D21560204

fbshipit-source-id: 02e41718307fddab6f0ac2101306bb7f4a59cf7e
2020-05-18 10:07:43 -07:00
Jun Wu
2aa85dc4d7 version: a Rust crate providing version information
Summary: Otherwise the version information is only available in Python.

Reviewed By: DurhamG

Differential Revision: D19803762

fbshipit-source-id: 044c5da86efc8c657d0c422a2b1947086444895e
2020-05-18 09:00:40 -07:00
Harvey Hunt
4629da9f0a mononoke: Fix potential race in blobstore write_order logging
Summary:
Currently, we have a gap between updating and subsequently reading the
value of `write_order`. If another blobstore's put operation completes before
we have called `record_put_stats` then we may have an incorrect `write_order`
value.

Whilst this is only a minor issue, let's fix it anyway. :-)

Reviewed By: krallin

Differential Revision: D21619669

fbshipit-source-id: 1b8bacbcb4c195e6765ebdfaa68425f286f88c06
2020-05-18 08:41:25 -07:00
Alex Hornby
7296456a39 mononoke: walker: use array of AtomicUsize for visit_count
Summary:
After other optimizations the CHashMap version of visit_count was showing as a hot spot.

Given the number of possible NodeTypes is small we can store the visit_count in array indexed by ordinal instead.

Reviewed By: farnz

Differential Revision: D21618518

fbshipit-source-id: 84978778034df11a9a48452adf9269db2dc17145
2020-05-18 08:17:00 -07:00
Stanislau Hlebik
54c036e8b2 mononoke: record git mapping while doing a push
Summary:
Currently we record them only during pushrebase. Let's record during push as
well.

To simplify things a little bit let's allow only a very simple push case:
1) Single bookmark.
2) All pushed commits should be reachable by this bookmark.

Reviewed By: krallin

Differential Revision: D21451337

fbshipit-source-id: bf2f1e6025ac116fb8096824b7c4c6440d073874
2020-05-18 05:41:41 -07:00
Stanislau Hlebik
108b468af3 mononoke: fix unnecessary bonsai entries when pushrebasing a merge
Summary:
This is the fix that might be hard to explain.

First, why we need `generate_additional_bonsai_file_changes()` function at all.
TL;DR is to fix pushrebasing of a diamond merge commit. Merge bonsai changeset
must have a file change entry if p1 and p2 has the same file with different
content, and when merge commit is pushrebased we need to preserve this property.
more details are in D18065013 and in the comments.

Secondly, what was wrong with generate_additional_bonsai_file_changes. While it
was technically correct (i.e. it was producing valid bonsai changeset) it had
an unexpected side-effect for non-diamond merges (e.g. repo imports). It was
adding all changed files between root and onto commit (i.e. all changed files
from commits over which it was rebased). This in turn leads to unnecessary
push failures with "conflicts" errors.

Thirdly, why it was wrong. generate_additional_bonsai_file_changes
a) finds all files changed between onto and root (see comments for more details about onto
and root),
b)then finds those that needs to be added in the pushrebase merge bonsai changeset.

The problem was in step b). It needed to check which files exists in merge
parent but instead it checked which files exists in merge commit itself.
This is because merge commit itself cannot change any of the files that were changed between root
and onto - in that case we get a pushrebase conflict. So all the files come
either from root commit or from another parents. And the entry can become
"stale" only if it existed in one of the parents and later was changed between
root and onto.

Reviewed By: krallin

Differential Revision: D21596758

fbshipit-source-id: f2bea36fcc29fc736caaa7494696a1f6dc848b9e
2020-05-18 05:31:31 -07:00
Alex Hornby
878693e1cf mononoke: walker: add MPathHash memoization to WrappedPath
Summary: Add MPathHash memoization to WrappedPath as the paths are hashed multiple times

Reviewed By: farnz

Differential Revision: D21613720

fbshipit-source-id: b850cf5ea1668b5ff75b07a0489b54f86078677a
2020-05-18 04:54:59 -07:00
Harvey Hunt
c45b4541e2 mononoke: Add with_tunables function to allow overriding tunable values
Summary:
Currently, there isn't a way to override the value of a tunable during
a unit test. This is unfortunate and may push people to creating integration
tests when unit tests would be best.

Add `with_tunables`, which allows callers to override the tunables values that
a closure accesses. Further, add an example unit test that shows the behaviour.

Thanks to krallin for suggesting this and helping with the implementation
details.

Reviewed By: krallin

Differential Revision: D21595220

fbshipit-source-id: c31da88fb4fcfd38f761960ffe8025132025e6c9
2020-05-18 04:31:40 -07:00
Stanislau Hlebik
211032d5af mononoke: log undesired file/tree fetches
Summary:
Let's add an option to log how many files and trees were fetched in a
particular repo that start with a prefix.

Reviewed By: farnz

Differential Revision: D21617347

fbshipit-source-id: a57f74eadf32781e6c024e18da252c98af21996d
2020-05-18 04:12:54 -07:00
Stanislau Hlebik
fc7b25b0a2 RFC: mononoke: add support for string tunables
Summary:
Just as for ints and bools, let's add support for strings.
A few notes:
1) we don't have AtomicString, so I decided to use ArcSwap<String>.
However to make code generation simpler (see tunables-derive) I've added a type
alias for that
2) Return type is Arc<String> to avoid unnecessary copies.Another option that we might have here is to put the whole Tunables structure inside ArcSwap, and changing `tunables()` to return Arc<MononookeTunables>
instead of &'static MononokeTunables. However that's a bigger change to make.

Reviewed By: markbt

Differential Revision: D21592390

fbshipit-source-id: 6d3cf340b13f7aef9adb2b1b99ed2bf260033285
2020-05-18 03:35:54 -07:00
Stanislau Hlebik
cc5d3fafc4 mononoke: update tunables struct
Reviewed By: markbt

Differential Revision: D21616301

fbshipit-source-id: 72ed3d77c10182738e56d876bcf7fa714e551c69
2020-05-18 03:35:53 -07:00
svcscm
fd5b027131 Updating submodules
Summary:
GitHub commits:

9b0e67ee8c

Reviewed By: zpao

fbshipit-source-id: bae83694fa49c0d32ca2861934935358d1c06e60
2020-05-18 03:35:53 -07:00
svcscm
14a432a34f Updating submodules
Summary:
GitHub commits:

0d8e13cf96

Reviewed By: zpao

fbshipit-source-id: 17d72824a48803c09f7978ebd21ba6f018923caa
2020-05-17 06:39:22 -07:00
svcscm
f103557161 Updating submodules
Summary:
GitHub commits:

81d2abd909

Reviewed By: zpao

fbshipit-source-id: 1901a6eac2f1ef70c4016c6a04c585de85bd6a5d
2020-05-16 21:24:58 -07:00
svcscm
f0503d2371 Updating submodules
Summary:
GitHub commits:

435aa6f17a
9908c44c20
085eeb2350
02a7046078
586b5278a6

Reviewed By: zpao

fbshipit-source-id: a05ce6a02eb756dfd6a5c448704d7aef23d50e2a
2020-05-15 21:10:12 -07:00
Durham Goode
49ac0401b7 discovery: go back to random sampling but include master
Summary:
An earlier change (D21394302) made discovery sampling use the most
recent commits. This ended up not being correct since if the requested sample
did not find any hits then the unknown set would not be reduced and the next
requested set would not change, resulting in an infinite loop.

The goal of the original diff was to ensure master was in the initial sample set
so we didn't have to inspect a bunch of really old commits. Let's go back to
random sampling, but manually insert master into the initial set.

In the long-term we should throw away all this code and use something similar to
discovery.fastdiscovery instead which just relies on the public heads.

Reviewed By: quark-zju

Differential Revision: D21577331

fbshipit-source-id: d738de255e292fc569eb27f250dcd3eaafaaae43
2020-05-15 19:03:29 -07:00
svcscm
2021c7ca73 Updating submodules
Summary:
GitHub commits:

8e6a6315dd
d0910a4d1b
4819eee6ac

Reviewed By: zpao

fbshipit-source-id: 8396b635b7444907e16927df06130b95052cc386
2020-05-15 18:52:23 -07:00
Adam Simpkins
145320fe96 check in some high-level design documentation for EdenFS
Summary:
This checks in some design documents based on the "EdenFS Internals"
presentation that I've given internally a few times.

Reviewed By: wez

Differential Revision: D21519530

fbshipit-source-id: 3f79d38e8ccf994b2ef303d491809a91fa5b6d95
2020-05-15 18:08:47 -07:00
svcscm
c0b0bb9797 Updating submodules
Summary:
GitHub commits:

c49a1f934e
2db01ebc47

Reviewed By: zpao

fbshipit-source-id: 9309fb61ecdbb86408b321ced8a200af5a0f5415
2020-05-15 18:05:50 -07:00
Xavier Deguillard
0634e3f690 cmake: do no allow concurrent jobs when compiling Rust
Summary:
CMake description of `JOB_POOL` is:
"A pool is a named integer property and defines the maximum number of
concurrent jobs which can be started by a rule assigned to the pool."

Not very clear by it looks like putting all the Rust jobs in it prevent CMake
from spawning concurrent jobs when these are running. This should help in
reducing the strain on the system while compiling, while not increasing
compile time.

Reviewed By: wez

Differential Revision: D21595135

fbshipit-source-id: e718c92a237274a9edbc35417644a46bdfde5617
2020-05-15 16:46:16 -07:00
svcscm
3ac615d9de Updating submodules
Summary:
GitHub commits:

ab94f6d977
4425227078
10e3eae0d4
35da1e767f

Reviewed By: zpao

fbshipit-source-id: 5ed64d41a20ce6288b5983c835e9798cc0e9d3b6
2020-05-15 13:36:15 -07:00
Xavier Deguillard
3f0dcccd42 mount: unify EdenMount::initialize
Summary:
Next step in unifying the mount path, let's make the initialize the same in
Windows and unices. The only difference is now limited to the .eden directory
which we will be able to implement once regular users can create symlinks.

For the takeover code, the #ifdef is pushed down to the actual code that does
it, this allows the rest of the code to not have to bother about Windows vs
other platforms.

Reviewed By: wez

Differential Revision: D21517478

fbshipit-source-id: d40ca2694d23031ff98e319071e610efa306008f
2020-05-15 13:14:55 -07:00
Stanislau Hlebik
6bfd2adb21 rust/thrift: add an option to stop processing requests if client disconnected
Reviewed By: farnz

Differential Revision: D20763778

fbshipit-source-id: 9963f9ec91ba9f502b4aea9411d40b43d3729388
2020-05-15 10:41:45 -07:00
Harvey Hunt
cecc0bf2dc mononoke: Add logging blobstore
Summary:
The blobstore multiplexer contains logic to log blobstore operations to
scuba, as well as updating `PerfCounters`. There are some cases where we don't use the
multiplexed blobstore, which means that we're missing this important logging.

Factor out the logging to a separate crate and implement `LogBlob`, which wraps
another blobstore and performs logging to both scuba and PerfCounters.

Reviewed By: StanislavGlebik

Differential Revision: D21573455

fbshipit-source-id: 490ffd347f1ad19effc93b93f880836467b87651
2020-05-15 10:28:31 -07:00
svcscm
ad303b48ee Updating submodules
Summary:
GitHub commits:

02fa333a56
dd4dd7b279
5d07a157a8

Reviewed By: zpao

fbshipit-source-id: 5dba0bd104b2d4e86ccc21850d852ea44277856b
2020-05-15 09:00:52 -07:00
Harvey Hunt
a26f1d21cb mononoke: Remove path from hook config
Summary:
The configerator thrift file was updated to remove a path from hook
config. However, this change wasn't synced to fbsource.

Sync the change and fix up the tests that are broken by this change.

Reviewed By: krallin

Differential Revision: D21594221

fbshipit-source-id: 7b64180914f6c6802e4d70fcb1a5d6ec36eb2eac
2020-05-15 08:10:12 -07:00
Thomas Orozco
6676a7a476 logginghelper: use repo basename as repo name
Summary:
When we don't provide a repo name, scm_telem_log will run `hg config` to try
and get the path, and fall back to using the basename of the repo directory.

However, this is a bit undesirable, because if we ran this code we already
checked the path, so the repo URL isn't going to magically materialize once `hg
config` asks for it, which means we make a completely redundant call to hg from
scm_telem_log.

By just doing this in logginghelper, we avoid this extra roundtrip.

Reviewed By: StanislavGlebik

Differential Revision: D21572027

fbshipit-source-id: 58e5ab2e3e525edef1ecde039cd968eab8d89172
2020-05-15 03:02:00 -07:00
Thomas Orozco
e96c923fba hghave: fix jq matching
Summary:
My jq has 2 spaces after "Usage:", so this fails. Let's make the matching a bit
more lenient.

Reviewed By: StanislavGlebik

Differential Revision: D21572028

fbshipit-source-id: 1948af8bbee6486df78299c3cc08209ce3ef3e12
2020-05-15 03:02:00 -07:00
Thomas Orozco
ec60105698 rage: collect debuglocks
Summary:
This feels like it might have been helpful here:
https://fb.workplace.com/groups/scm/permalink/2854695251246743/

Reviewed By: markbt

Differential Revision: D21575908

fbshipit-source-id: 0fcc74793ecfbd57d11e9d393a4bb63fe5d013ce
2020-05-15 02:57:50 -07:00
svcscm
3fa957dd70 Updating submodules
Summary:
GitHub commits:

ef4e45e6be
f3ec7dc3e9

Reviewed By: zpao

fbshipit-source-id: 629e349cbf08ae422ba6a8973c1528121a0a0dd7
2020-05-15 02:57:50 -07:00
svcscm
61724cbe22 Updating submodules
Summary:
GitHub commits:

1b4b90a028
17b31be012

Reviewed By: zpao

fbshipit-source-id: 504a9afa39116184bd7d211698b406d935116715
2020-05-14 22:53:59 -07:00
Jun Wu
d75ac1d575 sigtrace: also write tracing data
Summary: This might provide some useful insights for debugging hanging processes.

Reviewed By: kulshrax

Differential Revision: D21580307

fbshipit-source-id: 424992cdd9851bfd782a3333ed22ac1193c33fe3
2020-05-14 21:28:30 -07:00
Arun Kulshreshtha
57e92bb28d movement: allow prev/next with pending changes
Summary:
Make `prev` and `next` match the behavior of `update` and allow movement with pending changes. A new `--check` flag has been added to enforce a clean working copy (similar to `update`).

Note that these commands literally just call `update` under the hood, so this was just a matter of removing the existing dirtiness check. (The check was originally put there because `update` originally required a clean working copy by default.)

Reviewed By: quark-zju

Differential Revision: D21581805

fbshipit-source-id: 33d0ac4d36a795713054af7e8776d077fd353048
2020-05-14 21:23:27 -07:00
Arun Kulshreshtha
3f8518bf9b treemanifest: allow BFS prefetch without HTTP
Summary: Previously, we would only allow BFS prefetching when HTTP was enabled (since prior to the `designatednodes` server capability, SSH had no way of supporting BFS). That has now changed, so we should allow BFS even if HTTP is disabled.

Reviewed By: quark-zju

Differential Revision: D21581215

fbshipit-source-id: b9d5945730e2c718681004f7d5e5f319449fcf6a
2020-05-14 21:11:43 -07:00
svcscm
5bbe42d3cc Updating submodules
Summary:
GitHub commits:

0cec467ed0
0d590d5dd5
dd142643b9
2cc045b7e2
7a6adeea7c
2c01d87f58
468b087f3c
9359e9ab10
45dc2aa42e
5bbab2865d

Reviewed By: zpao

fbshipit-source-id: 287664b8e2882af79f4ed5b13747c4247446c941
2020-05-14 21:11:43 -07:00