Commit Graph

59882 Commits

Author SHA1 Message Date
Viet Hung Nguyen
f267bec3f7 mononoke/repo_import: add merge functionality
Summary:
Once we have revealed the commits to the user (D22864223 (578207d0dc), D22762800 (f1ef619284)), we need to merge the imported branch into the destination branch (specified by dest-bookmark). To do this, we extract the latest commit of the destination branch, then compare the two commits, if we have merge conflicts. If we have merge conflicts, we inform the user, so they can resolve it. Otherwise, we create a new bonsai having the two commits as parents.

Next step: pushrebase the merge commit

Minor refactor: moved app setup to a separate file for better readability.

Reviewed By: StanislavGlebik

Differential Revision: D23028163

fbshipit-source-id: 7f3e2a67dc089e6bbacbe71b5e4ef5f6eed2a9e1
2020-08-11 03:26:57 -07:00
svcscm
dd79f87e6e Updating submodules
Summary:
GitHub commits:

c41a357ed0
d17e2f0e0a
8187c1dc7d

Reviewed By: yns88

fbshipit-source-id: 2f7852b50cd770d0df0ec3a05048ebe4a0c89d02
2020-08-11 03:04:16 -07:00
Alex Hornby
74f2e7affc mononoke: add context to blobstore_sync_queue get error handling
Summary: Add context to show the affected key if there are problems peeking a key.

Reviewed By: farnz

Differential Revision: D23003001

fbshipit-source-id: b46b7626257f49d6f11e80a561820e4b37a5d3b0
2020-08-11 02:52:44 -07:00
Alex Hornby
0a8c81c668 mononoke: walker state, check for visited before insert
Summary:
Now that the previous diff has pre-computed the hash value using EagerHashMemo, its less expensive to try a read-lock only get() first before committing to a write lock acquiring insert().

The combination of these and the previous diff moved WalkState::visit from dominating the cpu profile to not ( the path interning dominates now ).

Reviewed By: krallin

Differential Revision: D22975881

fbshipit-source-id: 90b2be83282ee2095c517c0d4f13536ddadf6267
2020-08-11 02:52:43 -07:00
Alex Hornby
22add277f9 mononoke: update walker state to use eager hash memo
Summary:
DashMap takes the hash of its keys multiple times,  once outside the lock, and then once or twice inside the lock depending if the key is present in the shard.

Pre-computing the hash value using EagerHashMemo means its done only once and more importantly, outside the lock.

To use EagerHashMemo one needs to supply the BuildHasher, so its added as a struct member and the record method is made a member function.

Reviewed By: farnz

Differential Revision: D22975878

fbshipit-source-id: c2ca362fdfe31e5dca329e6200029207427cd9a1
2020-08-11 02:52:43 -07:00
Stefan Filip
2825193931 edenapi: add /commit/revlog_data endpoint
Summary:
Matches the `getcommitdata` SSH endpoint.
This is going to be used to remove the requirement that client repostories
need to have all commits locally.

Reviewed By: krallin

Differential Revision: D22979458

fbshipit-source-id: 75d7265daf4e51d3b32d76aeac12207f553f8f61
2020-08-11 01:54:14 -07:00
svcscm
4399b5a859 Updating submodules
Summary:
GitHub commits:

2dde034e4e

Reviewed By: yns88

fbshipit-source-id: 4e6a1d1abcb2d656d0b3e527c0153027d17b57ec
2020-08-11 00:34:24 -07:00
Tao Chen
e41f32a9f1 Add deprecated getSelection APIs to ServiceSelectorCache
Summary:
Instead of modifying the existing APIs and marking all callsites as deprecated in one diff, I am going to take the "add and remove" approach, where I will add the deprecated version of methods first, then mark all callsites, and finally remove the existing ones. This provides some backward compatibility without breaking things.

This diff is to add deprecated getSelection APIs to ServiceSelectorCache.

Differential Revision: D22981269

fbshipit-source-id: 6e3025e7f7df6ee7f9e1cba9dc036ca84adbe49a
2020-08-11 00:14:23 -07:00
Katie Mancini
58d012d8b4 enable metadata fetching by manifest id
Summary:
Previously we fetched metadata by commit hash and path. We knew this would be a
little extra expensive, but turns out this is a lot extra expensive.

Wait why is it expensive?
In short: lots of extra lookups that are not satisfied by cache :(
In long:
1. Each piece of the path would require a read to fetch the fsnode for that tree.
So this means asking for the metadata of a/b/c/d/e means 5 reads.
2. Normally these reads could be cached, but often we would make these requests
with a commit hash for a draft commit. On the server side this info is not
cached for a draft commit, this means a lot of database reads and recalculating.
(Most of the real uses of metadata prefetching is when an engineer is working
on a local commit. We just use the commit hash of the commit the user was on
when fetching metadata for a tree, even if that tree hasn't changed since a public
commit. so this means lots of requests with draft commit hashes).

Fetching by manifest id we are able to bypass this sequential path look up.
(and even if we are on a draft commit, if the tree has not locally changed
since a public commit, the manifest id will be the same as the public commit
avoiding this whole draft commit issue).

This allows us to query scs with a manifest id for a tree.

Reviewed By: wez

Differential Revision: D22990687

fbshipit-source-id: aa81d67de1f1d04a14d174774ee216f5ac6be5ba
2020-08-10 23:53:10 -07:00
svcscm
ef8e8a67ac Updating submodules
Summary:
GitHub commits:

11bbe00223

Reviewed By: yns88

fbshipit-source-id: 5500c8935f26cd80d0dc5a8a8ba277a84ec42abb
2020-08-10 23:53:09 -07:00
svcscm
05f384a005 Updating submodules
Summary:
GitHub commits:

c7d609d4b3
2d3f23416a
29d5eb9f3c

Reviewed By: yns88

fbshipit-source-id: 643e05b4e38ac940a373e3cf7e16badf134e8057
2020-08-10 15:56:57 -07:00
Simon Farnsworth
3086b241c6 Give the blobstore healer a way to cope with temporary falls in MySQL capacity
Summary:
The query we use to select blobs to heal is naturally expensive, due to the use of a subquery. This means that finding the perfect queue limit is hard, and we depend on task restarts to handle brief overload of MySQL.

Give us a fast fall in batch size (halve on each failure), and slow climb back (10% climb on each success), and a random delay after each failure before retrying.

Reviewed By: StanislavGlebik

Differential Revision: D23028518

fbshipit-source-id: f2909fe792280f81d604be99fabb8b714c1e6999
2020-08-10 15:24:13 -07:00
svcscm
c5ce8557b5 Updating submodules
Summary:
GitHub commits:

cf2fff415e

Reviewed By: yns88

fbshipit-source-id: a1ef781f98c24c71582697699b5cf5aa20193ea5
2020-08-10 15:24:13 -07:00
svcscm
1a64cf90f5 Updating submodules
Summary:
GitHub commits:

ebc1ae6853
cb26c8cc80

Reviewed By: yns88

fbshipit-source-id: ef11513c5311121f1cb6ebf0a2224fdfe0e57d29
2020-08-10 11:41:21 -07:00
Stanislau Hlebik
9787a2c33a mononoke: add admin command to return filenodes for path
Summary: It's useful to debug filenodes

Reviewed By: krallin

Differential Revision: D23028528

fbshipit-source-id: 500fe2ad62a8e07498f46801c0c1523d1656ceeb
2020-08-10 11:13:01 -07:00
Xavier Deguillard
c22f6ed35d cmdutil: fix hg log -Tjson with utf8 characters
Summary:
All of these are already valid utf-8 characters, no need to dance to
decode/encode them again.

Reviewed By: DurhamG

Differential Revision: D22978828

fbshipit-source-id: c5f6e25e71cdcaa1c0558d4a1181b667ffe379fb
2020-08-10 09:48:34 -07:00
Xavier Deguillard
0273817488 win: simplify path management
Summary:
The StringConv.h header contains many functions to convert from Windows paths
to Eden's path (and vice versa) to workaround the fact that Eden's path don't
support wide strings that Windows uses. Let's simply add support for these wide
strings in PathFuncs so we can greatly simplify all the call sites. Instead of
calling "edenToWinName(winstr)", "PathComponent(winstr)" is both more
descriptive and more idiomatic.

To be fair, I'm not entirely a fan of the approach taken in this diff, as this
adds Windows specific code to PathFuncs.h, but I feel that the benefit is too
big to not do that.

Reviewed By: chadaustin

Differential Revision: D23004523

fbshipit-source-id: 3a1507e398a66909773251907db01e06603b91dd
2020-08-10 08:53:13 -07:00
Stanislau Hlebik
bdd494b2ce mononoke: fix filenodes cache key
Summary:
`is_tree` weren't part of the cache key, and that means we could have returned
incorrect history if we had a file and a directory with the same name.

This diff fixes it.

Reviewed By: krallin

Differential Revision: D23028527

fbshipit-source-id: 98a3b2028fa62231dfb570a76fb836374ce1eed0
2020-08-10 07:13:35 -07:00
Stanislau Hlebik
21e232ddaf mononoke: add init_tunables in fastreplay
Summary:
I noticed that fastreplay doesn't init tunables, and that means that it doesn't
get the updates, and more importantly it doesn't use default values of
tunables.

That doesn't look expected (but lmk if I'm wrong!)

Reviewed By: krallin

Differential Revision: D23027311

fbshipit-source-id: ee43d02457d2240ebeb1530c672cb3847bc3afd4
2020-08-10 03:55:41 -07:00
svcscm
a02e2c7853 Updating submodules
Summary:
GitHub commits:

cfe7cfea7e

Reviewed By: wittgenst

fbshipit-source-id: 29c93cde4e3d050fd286f3de88d9edbd3e457dd5
2020-08-10 03:44:34 -07:00
Alex Hornby
02b9979b21 rust: vendor dashmap 3.11.9
Summary: This has my into_key() PR https://github.com/xacrimon/dashmap/pull/91 merged so the patch pointing to my fork is also removed.

Reviewed By: farnz

Differential Revision: D22896911

fbshipit-source-id: 188d438ce2aa20cfb3c466a62227d1cd27625f74
2020-08-10 03:19:33 -07:00
svcscm
c29fcf3228 Updating submodules
Summary:
GitHub commits:

3f88687795
cf617e5912
fb75df1eec
3787e396e2
2839bfc5cb
fe602541b4
082d116f0f
da35611013

Reviewed By: wittgenst

fbshipit-source-id: f64748e97be7324e4cbbcd2a5e63538519687179
2020-08-10 03:19:33 -07:00
svcscm
1c8c445e33 Updating submodules
Summary:
GitHub commits:

6f028d5d75

Reviewed By: wittgenst

fbshipit-source-id: e10637be34c4779cfbc953368cf0f8baa2a6347b
2020-08-09 18:22:39 -07:00
svcscm
4cb24df65a Updating submodules
Summary:
GitHub commits:

23b4e99c57

Reviewed By: wittgenst

fbshipit-source-id: f4cdc14c8daf6615f99f7013c07087dea1461d07
2020-08-08 22:23:11 -07:00
svcscm
64a1cc6c3a Updating submodules
Summary:
GitHub commits:

31dce13f6c

Reviewed By: wittgenst

fbshipit-source-id: dc6573b53089fe592d64a1df32a4647eb30e5484
2020-08-07 21:40:33 -07:00
Xavier Deguillard
adefb956e9 win: remove old visual studio project
Summary:
Nobody is using it, and it is very likely very out of date, no need to keep
this around.

Reviewed By: chadaustin

Differential Revision: D23008636

fbshipit-source-id: 2f29dae5986ce14b5b77523ff6a888c6824e97c5
2020-08-07 20:22:51 -07:00
svcscm
90d0c9c462 Updating submodules
Summary:
GitHub commits:

465ae25f4d

Reviewed By: wittgenst

fbshipit-source-id: 3b141e4fee171eeaa1f6732f2b521a12a1c70473
2020-08-07 20:22:51 -07:00
svcscm
41e0f0824f Updating submodules
Summary:
GitHub commits:

abb4ece621
5dab230b5b
8a1da56b96
df0cd25a73

Reviewed By: wittgenst

fbshipit-source-id: 50aa2cf0556879c589c314ff31e8d7cf73a07e70
2020-08-07 15:36:22 -07:00
Jun Wu
795387c702 py3: fix absorb -i
Summary: The working copy file contents are bytes.

Reviewed By: kulshrax

Differential Revision: D22989320

fbshipit-source-id: 136c35867fb8cb32ea1874158847714e085f780d
2020-08-07 14:12:22 -07:00
svcscm
878724881a Updating submodules
Summary:
GitHub commits:

8a8c6dfa64
b19f43062a
735ae41fd1

Reviewed By: wittgenst

fbshipit-source-id: 5a63827fed4afcc5427e8a2108b093330b7739c0
2020-08-07 14:12:22 -07:00
svcscm
c8deeb6ca5 Updating submodules
Summary:
GitHub commits:

f810c187e3
4892f1bb13
86c8ddd2db
a334cd6dca
832b056a30
425a1a346c

Reviewed By: wittgenst

fbshipit-source-id: fcba1f0fbbe530cccd9d1dde375466b80ba515cf
2020-08-07 12:34:27 -07:00
Xavier Deguillard
53c6c0befd win: rework the Pipe API a bit
Summary:
This makes it similar to the Unix one, which reduces the ifdef a tiny bit.
Ideally I'd want to move the pipe handling into its own class so callers won't
have to care about windows/linux specificities.

Reviewed By: fanzeyi

Differential Revision: D22954056

fbshipit-source-id: c92a25b6abe084a7c7496c0d6e07795779e0abad
2020-08-07 11:05:31 -07:00
svcscm
de225ef93e Updating submodules
Summary:
GitHub commits:

f2d225e496

Reviewed By: wittgenst

fbshipit-source-id: 1815ba88e38a69daf4bbf331eccb8c8bc26e9a3a
2020-08-07 08:37:14 -07:00
Mark Thomas
951164c472 commitcloud: ignore cloud heads that are not in the smartlog
Summary:
When computing which heads to remove because of bookmark removal,
ignore any heads that are not in the smartlog dag.

Heads might be missing from the smartlog dag if they're not
available on the server.

Reviewed By: quark-zju

Differential Revision: D22980810

fbshipit-source-id: f002eece8567aaf57780f592aaf29a790b8314ce
2020-08-07 07:26:16 -07:00
Alex Hornby
a7ff2a0c34 rust: vendor ahash 0.4.4
Summary:
Vendor ahash 0.4.4.   In tests I haven't found this update significant in mononoke walker performance, but might as well be current now I'd tried it.

I have found that wrapping ahash in a memoizing hasher helps, but that is for another diff.

Reviewed By: farnz

Differential Revision: D22864635

fbshipit-source-id: 5019259273ae3bd2df95cdd18adceed895baf8f2
2020-08-07 05:34:01 -07:00
Liubov Dmitrieva
b15b2d589e fix hg pull -r command doesn't work if we pull a hidden commit
Summary:
A commit doesn't show up after `hg pull -r` command if it's known locally.
This is a bug that the test demonstrates.

Reviewed By: quark-zju

Differential Revision: D22977182

fbshipit-source-id: 428094568140892fc8a13004f3395371d8b55ebf
2020-08-07 04:33:43 -07:00
Alex Hornby
e0c6e249fe mononoke: add a non-thrift header to packblob so we can vary thrift protocol in future
Summary: Add a non-thrift header to packblob so we can vary thrift protocol in future.

Reviewed By: farnz

Differential Revision: D22953758

fbshipit-source-id: a114a350105e75cbe57f6c824295d863c723f32f
2020-08-07 03:43:56 -07:00
svcscm
0da0eca7bd Updating submodules
Summary:
GitHub commits:

ccdd71160b

Reviewed By: wittgenst

fbshipit-source-id: face924097445d231996eb524c12daea709ba9bd
2020-08-07 03:43:56 -07:00
svcscm
93b09d102e Updating submodules
Summary:
GitHub commits:

f7aafd3881

Reviewed By: wittgenst

fbshipit-source-id: 462dc35aa11892faf6f04450a21e462be8ec3e5f
2020-08-06 20:54:24 -07:00
Meyer Jacobs
b9f3c9c692 taggederror: Introduce taggederror-util for more ergonomic error tagging for eden error types.
Summary:
Introduce taggederror-util, which provides a new trait `AnyhowEdenExt`, which provides a method `eden_metadata` for anyhow errors and results. This method works much like `AnyhowExt::common_metadata`, but additionally supports extracting default error metadata from known `Tagged` types which are listed explicitly in the method implementation.

Extend `FilteredAnyhow` to support a configuration "metadata function", which allows swapping out `eden_metadata` for the standard `common_metadata`.

Modify Rust dispatch and Python bindings to use `AnyhowEdenExt` for metadata extraction and printing.

Modify `intentional_error` to rely on `AnyhowEdenExt` for tagging (removes `.tagged` call, no tags will be visible if `AnyhowEdenExt` is not used).

Reviewed By: DurhamG

Differential Revision: D22927203

fbshipit-source-id: 04b36fdfaa24af591118acb9e418d1ed7ae33f91
2020-08-06 19:37:25 -07:00
svcscm
6eab61a790 Updating submodules
Summary:
GitHub commits:

30dcb7d880
56f468b356
0b015012bc

Reviewed By: wittgenst

fbshipit-source-id: 1f1df4ca57569a33c9e45cbcc90c6407fad653b3
2020-08-06 19:37:25 -07:00
svcscm
ee4b9a962f Updating submodules
Summary:
GitHub commits:

d2113ef8ed
b90dd8c4d3
e79c0fdfa5
d030291346
de23dcffcb
fa896dd473
67bbac3621
9de769cbc2
95c698d69a
a21ee0850f
2fc1c114d6
c7f2e0549c
cffc770d01
9de1eeccc6

Reviewed By: wittgenst

fbshipit-source-id: ad0187548db9d6e22ac034607817a4f30c39c1d5
2020-08-06 16:19:04 -07:00
Arun Kulshreshtha
f293577672 http_client: allow setting chunk size for async responses
Summary:
Add a `buffered()` method to `AsyncResponse`  allowing the user to specify the desired chunk size for the body stream.

(This was already used internally by `CborStream`; this just exposes it in the public interface.)

Reviewed By: quark-zju

Differential Revision: D22935891

fbshipit-source-id: e110e85bf9cb4c7923a8977ea4631ca1cc4cf4cb
2020-08-06 15:56:56 -07:00
Arun Kulshreshtha
6707c2fc3c http_client: rename cbor module
Summary: Rename the `cbor` module to `stream` to better indicate that it contains various stream combinators (not all of which are related to CBOR).

Reviewed By: quark-zju

Differential Revision: D22935892

fbshipit-source-id: 3f73aa707ab59c31717c1cf35995ad79946a15c9
2020-08-06 15:56:56 -07:00
Cooper Lees
04d5828fd7 Update zstd dev debian package
Summary:
- Move to the newer and forward moving libzstd-dev
https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=libzstd&searchon=names

Reviewed By: wez

Differential Revision: D22981784

fbshipit-source-id: 3647357aad60f2335ea494c35c174e9ffec61346
2020-08-06 14:58:04 -07:00
svcscm
9a646b7dcc Updating submodules
Summary:
GitHub commits:

e9f9f4c9c1
3512f9459c
7ce669e5cc
801710bef9
207592a942
f310d3c091
6f61068d42
a67a4aa797
e7019f479d
fb43cd01f3
70cea3f829
21186f344b

Reviewed By: wittgenst

fbshipit-source-id: 01e6e8055875692d2eb5806e0e2b7fc7d1a8095e
2020-08-06 14:58:03 -07:00
svcscm
7930b60dce Updating submodules
Summary:
GitHub commits:

637647681f
e0737cc8f1
e20d1ab8c2
bdf5690a9f
66472a61ab
8616ea5f82
71c7e4935e
88b4df4f2e
2013811024
7ada11a3a3
447113a0d2
f00a697279
93e2dbdef8
16a5b49363

Reviewed By: wittgenst

fbshipit-source-id: 596c1f7a43be4cab0b5edc98434e51bc9d62b90f
2020-08-06 13:41:14 -07:00
Ailin Zhang
4f43f8bb8d make a separate command for prefetch_profile
Summary:
Previously `eden prefetch` had two subcommands `record-profile` and `finish-profile`, but then when we only want to use `eden prefetch PATTERN`, an error shows up saying that the COMMAND argument is missed.

Since `eden prefetch` has many of its own arguments, and we don't want to use it with `record-profile` and `finish-profile` all the time, we remove those subcommands and create a new `eden debug prefetch_profile` command to get prefetch profiles.

Reviewed By: fanzeyi

Differential Revision: D22959981

fbshipit-source-id: 21b278555fcb56580a62f66a7384b1cff54ba398
2020-08-06 13:17:07 -07:00
Xavier Deguillard
a85e32d7e0 runcmd: do not pipe stdout on a tty
Summary:
Redirecting stdout means that ninja/cmake won't act as if it's invoked
interactively, ie: it will buffer the output, show every single files being
compiled (instead of just a line or progress), etc. This results in a fairly
janky UX when getdeps is used on the command line. By not redirecting stdout,
we get immediate feedback about the tests being run, and the files being
compiled.

Reviewed By: wez

Differential Revision: D22967815

fbshipit-source-id: 872ddbf421065686c384a3a876d0acb8832baf2e
2020-08-06 13:12:43 -07:00
Stanislau Hlebik
be3c46e10d mononoke: add --find-latest-imported-rev-only mode to blobimport
Reviewed By: ikostia

Differential Revision: D22975677

fbshipit-source-id: d4322901a84b8d76ccdffab17421f32c8e7510eb
2020-08-06 13:08:50 -07:00