Commit Graph

56208 Commits

Author SHA1 Message Date
svcscm
599c306bb4 Updating submodules
Summary:
GitHub commits:

18b7169371
9592e383f0

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a0f854d57c72041b1a36cb013f98ff363b525a2a
2020-03-10 01:57:21 -07:00
Lukas Piatkowski
6365fa6509 rust-shed: add no-op memcache_stub implementation to the shed
Reviewed By: mitrandir77

Differential Revision: D20304739

fbshipit-source-id: bd2956619f6a5cf1551bccb921780e7a542e9859
2020-03-10 01:07:46 -07:00
svcscm
5ad6b33507 Updating submodules
Summary:
GitHub commits:

59dd5b0320
abfc5012c1
fd1da22111

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 62e5c3cd06da8e4386fb4dfdd6f8670cad164201
2020-03-10 01:07:45 -07:00
svcscm
15fe8cf76e Updating submodules
Summary:
GitHub commits:

054e5f786a
a821ceb8d2
78c05afed9

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 34811d3c9c92c715064f53c7237f091a85191b13
2020-03-09 18:00:21 -07:00
Adam Simpkins
e1490e631c add a counter to report the number of mount failures during startup
Summary:
Add a counter to report the number of mounts that we failed to remount during
startup.  Mount failures do not prevent EdenFS startup from proceeding.  It is
useful to have a metric to report if these errors did occur even though the
start-up as a whole still proceeded otherwise.

Reviewed By: chadaustin

Differential Revision: D20319512

fbshipit-source-id: fd503a1ccc91b476cc9dc2bc6323501bbbeaf2c5
2020-03-09 17:41:34 -07:00
svcscm
238af176cb Updating submodules
Summary:
GitHub commits:

8fdcdbbfff
99586de4c3
7f7ea0ec78
9cea11f2bd

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 2080f7bdc89657f224043a4ce9d463d7af567309
2020-03-09 17:14:54 -07:00
Aida Getoeva
84c0aa9e8c mononoke: allow to derive changeset info
Summary: This also replaces RepoBlobstore with generic Blobstore.

Reviewed By: krallin

Differential Revision: D20336107

fbshipit-source-id: 4e09430d462053d5ccb0b2f0eca7a9d0417b4b5e
2020-03-09 16:41:53 -07:00
svcscm
467ed05ec3 Updating submodules
Summary:
GitHub commits:

a720c96853
676f71d026
8fb9292b67
c86b3ed7f8
60e60ff18e

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d56e2bb54874d95f2c775a8b5b0fac31bbbc0cdd
2020-03-09 15:35:47 -07:00
Jun Wu
fc911f4c3f sampling: make sure output JSON strings are valid utf-8
Summary:
On Python 2 the Mercurial JSON can be binary, which can break the telemetry
logger. Ensure the JSON string is valid utf-8 (although it might still be
invalid JSON).

Reviewed By: xavierd

Differential Revision: D20343845

fbshipit-source-id: 61e99e742bddf23c7fd5354a5754d79a0a452c28
2020-03-09 14:24:29 -07:00
svcscm
6e88af8391 Updating submodules
Summary:
GitHub commits:

93392c1af5

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a486961285e94875a11dc6ee05749e0e9bf6927c
2020-03-09 12:59:39 -07:00
Stanislau Hlebik
b0cb300af8 mononoke: introduce BlobrepoBuilder
Summary:
The goal of the whole stack is quite simple (add reponame field to BlobRepo), but
this stack also tries to make it easier to initialize BlobRepo.

To do that BlobrepoBuilder was added. It now accepts RepoConfig instead of 6
different fields from RepoConfig - that makes it easier to pass a field from
config into BlobRepo. It also allows to customize BlobRepo. Currently it's used
just to add redaction override, but later we can extend it for other use cases
as well, with the hope that we'll be able to remove a bunch of repo-creation
functions from cmdlib.

Because of BlobrepoBuilder we no longer need open_blobrepo function. Later we
might consider removing open_blobrepo_given_datasources as well.

Note that this diff *adds* a few new clones. I don't consider it being a big
problem, though I'm curious to hear your thoughts folks.

Note that another option for the implementation would be to take a reference to objects
instead of taking them by value. I briefly looked into how they used, and lot of them are passed to the
objects that actually take ownership of what's inside these config fields. I.e. Blobstore essentially takes ownership
of BlobstoreOptions, because it needs to store manifold bucket name.
Same for scuba_censored_table, filestore_params, bookmarks_cache_ttl etc. So unless I'm missing anything, we can
either pass them as reference and then we'll have to copy them, or we can
just pass a value from BlobrepoBuilder directly.

Reviewed By: krallin

Differential Revision: D20312567

fbshipit-source-id: 14634f5e14f103b110482557254f084da1c725e1
2020-03-09 12:05:57 -07:00
Stanislau Hlebik
44effbe62e mononoke: log derived data type and changeset as separate fields
Summary:
We've recently added new scuba table for derived data
(https://fburl.com/scuba/mononoke_derived_data/e4sekisf), and looks like our
previous format of logging is not very useful. It's better to have separate
fields for changeset id and derived data type, since it makes aggregation
easier.

Reviewed By: krallin

Differential Revision: D20309093

fbshipit-source-id: 48f5f04e0412002ef04028e34b12bf267a9b6834
2020-03-09 10:56:59 -07:00
Stefan Filip
d8b4ddcecf dag: split lock file acquisition to own function
Summary:
Spliting lock file acquisition from `IdDag::prepare_filesystem_sync` to its own
function.
Useful when looking ahead to split IdDag from IndexedLog.

Reviewed By: quark-zju

Differential Revision: D20316443

fbshipit-source-id: a0fd43439730376920706bb4349ce497f6624335
2020-03-09 10:18:07 -07:00
Stefan Filip
620cdd96f2 dag: add IdDag::iter_segments_with_parent
Summary:
This removes an inline use of the indexedlog indexes.
This is going to be useful when we try to separate IndexedLog specifics from
IdDag functionality.

Reviewed By: quark-zju

Differential Revision: D20316058

fbshipit-source-id: 942a0a71660bb327376c81fd3ac435d002ecca6e
2020-03-09 10:18:07 -07:00
Mark Thomas
1017318ecf rage: add debugnetwork
Summary:
Add `hg debugnetwork` to the things that `hg rage` collects.

Some of the output from `hg debugnetwork` comes from the peer connection, which is not captured when using `ui.pushbuffer`, as it is written using the remote ui object created when the peer connection is set up.

To handle this, add `ui._outputui` as a way to redirect ui output to another ui object, and use this to redirect the output from the remoteui to the local ui object which is buffering output for hg rage.

Reviewed By: quark-zju

Differential Revision: D20307725

fbshipit-source-id: 3b79a77a39c6e2c5f8a7d5cc271ec466653d4db3
2020-03-09 08:59:13 -07:00
Mark Thomas
63d704f456 mercurial_types: add mock functions for generating commit IDs
Summary:
The mock crates contain a standard set of mock commits ids with all nybbles
set to a single hex value.

For the mutation tests I want to be able to generate them from a number and
have more than 15 changeset IDs.  Add a new function that generates an hg
changeset ID from a number.

Reviewed By: krallin

Differential Revision: D20287382

fbshipit-source-id: 1f57de89f19e2e2eea8dbfea969a4d54510e23d8
2020-03-09 07:24:46 -07:00
Stanislau Hlebik
c1ea56c17c mononoke: asyncify blobrepo_factory
Summary:
Note that comparing to many other asyncifying efforts, this one actually adds
one more clone instead of removing them. This is the clone of a logger field.
That shouldn't matter much because it can be cleaned up later and because this
function will be called once per repo.

Reviewed By: krallin

Differential Revision: D20311122

fbshipit-source-id: ace2a108790b1423f8525d08bdea9dc3a2e3c37c
2020-03-09 05:02:05 -07:00
svcscm
92345e1baf Updating submodules
Summary:
GitHub commits:

3de4d86b02

Reviewed By: yns88

fbshipit-source-id: 6a5d13b2c225e70d884c1ca4dc9e72dd6b7e2fef
2020-03-09 05:02:05 -07:00
svcscm
1388840fb1 Updating submodules
Summary:
GitHub commits:

2ece938967

Reviewed By: yns88

fbshipit-source-id: 41ebfccf67c17645456719e06d6e6374b2a9bc60
2020-03-09 03:24:39 -07:00
svcscm
d949fec28e Updating submodules
Summary:
GitHub commits:

697acb5260
dfa596f3a2
3dd8f12e47
2ff2931a5d
41db1690c4

Reviewed By: yns88

fbshipit-source-id: 56cfc09a32f88848b96dc11463783f7841eac54b
2020-03-08 13:25:10 -07:00
svcscm
325eee81a8 Updating submodules
Summary:
GitHub commits:

a0a57b16ad

Reviewed By: yns88

fbshipit-source-id: 3780f3cf6ca241a3f042d3a85f3c054b3cd3a3dc
2020-03-07 15:23:56 -08:00
svcscm
fed5e141a8 Updating submodules
Summary:
GitHub commits:

bbfe2afc63
c74cad72a4

Reviewed By: yns88

fbshipit-source-id: 383f7924d677c307a244989f0bd7042f051e3d80
2020-03-06 14:32:52 -08:00
Adam Simpkins
e0ad04357e also ignore ENOTCONN in "edenfsctl mount"
Summary:
When checking to make sure the destination directory does not look mounted,
ignore ENOTCONN errors.  This can happen if the directory is from a previous
EdenFS instance and did not get unmounted from the kernel properly.

While ideally it would be nicer to run `umount -lf` to clean up this stale
mount point, simply mounting a new checkout on top of this directory is fine.
We don't try to clean up the old mount point here since `umount -lf` would
require root priviliges.

Reviewed By: wez

Differential Revision: D20313117

fbshipit-source-id: c25c85d6b80750662b301f0dff8f293299770a4d
2020-03-06 14:09:37 -08:00
svcscm
baca644ee3 Updating submodules
Summary:
GitHub commits:

1149c52783
b633c9d4a3
f6c2777d95

Reviewed By: yns88

fbshipit-source-id: 0e8266e68fa2bdd32755849893cddcac40377b01
2020-03-06 13:44:37 -08:00
Stanislau Hlebik
c15405d96d mononoke: remove unnecessary clones from lfs_server
Reviewed By: krallin

Differential Revision: D20310686

fbshipit-source-id: 662a9cf358e389e848b1196bbf03469aec691ab8
2020-03-06 13:07:10 -08:00
Mark Thomas
f54c43c22f debugnetwork: add command for debugging network connection problems
Summary:
Add a command that performs various network tests to check the connection to
the Mercurial server for SSH peers.

These tests are:

* Check we can look up the server name in DNS.
* Check we can make a TCP connection to the SSH server.
* Check we can connect and authenticate over SSH and run `hostname`.
* Check we can make a Mercurial wireproto connection and find the `master` bookmark.
* Check the download and upload speed to the server.

Checking the speed requires a companion speed test program on the server.

Reviewed By: mitrandir77, farnz

Differential Revision: D20305227

fbshipit-source-id: adba02a6a1c40ffc20d7bf9d962a5fcf85e06544
2020-03-06 12:27:49 -08:00
generatedunixname89002005307016
4257f52a23 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: pradeep90

Differential Revision: D20290816

fbshipit-source-id: 210d6944c32314ca6dc0c295aa95d6fbdde04ecc
2020-03-06 12:14:56 -08:00
Kuba Zika
6a25dbee81 Simplify error pattern matching
Summary:
Instead of returning `anyhow::Error` wrapping an `ErrorKind` enum
from each Thrift client method, just return an error type specific
to that method. This will make error handling simpler and less
error-prone by removing the need to downcast the returned error.

This diff also removes the `ErrorKind` enums so that we can be sure
that there are no leftover places trying to downcast to them.

(Note: this ignores all push blocking failures!)

Reviewed By: dtolnay

Differential Revision: D20260398

fbshipit-source-id: f0dd96a7b83dd49f6b30948660456539012f82e6
2020-03-06 12:09:38 -08:00
Hezi Zhang
d7fa579a9c Track readlink() requests during checkout and status
Summary: Pass a valid ObjectFetchContext down into certain untracked requests.

Reviewed By: chadaustin

Differential Revision: D20243575

fbshipit-source-id: e7112c3bab1265803a26130c4d72905c25f2e729
2020-03-06 11:58:25 -08:00
svcscm
e67a89aeba Updating submodules
Summary:
GitHub commits:

df0b5a511e
34ba7dce99

Reviewed By: yns88

fbshipit-source-id: 903012cf324c35a91d6359403fe6a25b1cf14275
2020-03-06 10:58:44 -08:00
Xavier Deguillard
bfae923336 changelog: the _delaybuf is a byte list
Summary: Make a bytestring with 'b""' to fix Python3

Reviewed By: DurhamG

Differential Revision: D20287313

fbshipit-source-id: 7455d1509684bfb0857a3b060bdcca7e658343fd
2020-03-06 10:29:33 -08:00
Xavier Deguillard
2a47ead18d debug: fix _quasirepr
Summary: Just remove the b.

Reviewed By: DurhamG

Differential Revision: D20286947

fbshipit-source-id: dabdf39fc7f8efa271059e9f179d7417a03f820a
2020-03-06 10:29:32 -08:00
Xavier Deguillard
36ff5d6a7d remotenames: fix expaths
Summary: We need to encode/decode utf8 when reading/writing to the hgrc file.

Reviewed By: DurhamG

Differential Revision: D20286068

fbshipit-source-id: b1d6828fb62a83ad22414de6883004411f302142
2020-03-06 10:29:32 -08:00
Xavier Deguillard
e19f3b97ff extensions: base64.decodestring is deprecated
Summary: Use the recommended base64.b64decode instead.

Reviewed By: quark-zju

Differential Revision: D20297574

fbshipit-source-id: 9d78bc5938ae1888d1d57377e376e6775c1c87d5
2020-03-06 10:29:31 -08:00
Stanislau Hlebik
b905d1399c mononoke: change error of log messages
Summary:
Previously we could have "Started ..." before "Starting ..."
This diff fixes it.

Reviewed By: krallin

Differential Revision: D20277406

fbshipit-source-id: 3c2f3fa1723c2e0852c6b114592ab7ad90be17ff
2020-03-06 10:24:24 -08:00
svcscm
0ae16d2266 Updating submodules
Summary:
GitHub commits:

6f3d8f43d9

Reviewed By: yns88

fbshipit-source-id: 1131ffb085118035a8c918841cbc84abee4b6826
2020-03-06 10:17:28 -08:00
Stanislau Hlebik
9df1cc0028 remotefilelog: prefetch files in chunks
Summary:
We saw >10 timeouts on Mononoke side from people who fetch a lot of files from corp network (https://fburl.com/scuba/mononoke_test_perf/qd15c5f1). They all tried to download a lot of files, and they 90 mins timeout limit.

Let's try to download these files in rather large chunks (e.g. 200000 files). That should help with resumability and prevent timeout errors, and make retries smaller.

It adds an overhead for establishing a new connection after every 200000 files. That shouldn't be a big problem, and even if it's a big problem we can just increase remotefilelog.prefetchchunksize.

Reviewed By: xavierd

Differential Revision: D20286499

fbshipit-source-id: 316c2e07a0856731629447627ae65c094c6eecc5
2020-03-06 10:06:06 -08:00
Katie Mancini
b0a5ffb100 Expose number of imports queued
Summary: expose the counters for number of pending imports (blobs, trees, prefetches) to allow use in tooling

Reviewed By: chadaustin

Differential Revision: D20269853

fbshipit-source-id: d2b7e2110520290751699c4a891d41ebd5b374cf
2020-03-06 09:28:55 -08:00
Xavier Deguillard
b43f9b8d14 remotefilelog: retry fetches on dropped connections
Summary:
On bad network link (such as on VPN), the reliability of the connection to
Mercurial might be fairly flaky. Instead of failing fetching files, let's retry
a bit first, in the hope that the connection will be back by then.

Reviewed By: quark-zju

Differential Revision: D20295255

fbshipit-source-id: d3038f5e4718b521ae4c3f2844f869a04ebb25e3
2020-03-06 08:32:16 -08:00
Jun Wu
3103fcf62b indexedlog: reload content after obtaining a lock at open time
Summary:
The old code does "read, lock, write", which is unsound because after "lock"
the data just read can be outdated and needs a reload.

Reviewed By: xavierd

Differential Revision: D20306137

fbshipit-source-id: a1c29d5078b2d47ee95cf00db8c1fcbe3447cccf
2020-03-06 08:12:02 -08:00
Thomas Orozco
9493a05e7b mononoke/filestore: update store_bytes to chunk content
Summary:
This updates the store_bytes method to chunk incoming data instead of uploading
it as-is. This is unfortunately a bit hacky (but so was the previous
implementation), since it means we have to hash the data before it has gone
through the Filestore's preparation.

That said, one of the invariants of the filestore is that chunk size shouldn't
affect the Content ID (and there is fairly extensive test coverage for this),
so, notionally, this does work.

Performance-wise, it does mean we are hashing the object twice. That actually
was the case before as well anyway (since obtain the ContentId for FileContents
would clone them then hash them).

The upshot of this change is that large files uploaded through unbundle will
actually be chunked (whereas before, they wouldn't be).

Long-term, we should try and delete this method, as it is quite unsavory to
begin with. But, for now, we don't really have a choice since our content
upload path does rely on its existence.

Reviewed By: StanislavGlebik

Differential Revision: D20281937

fbshipit-source-id: 78d584b2f9eea6996dd1d4acbbadc10c9049a408
2020-03-06 07:43:07 -08:00
Thomas Orozco
56a7ce8697 mononoke/filestore: make FilestoreConfig Copy and pass it by value
Summary:
This is a very small struct (2 u64s) that really doesn't need to be passed by
reference. Might as well just pass it by value.

Differential Revision: D20281936

fbshipit-source-id: 2cc64c8ab6e99ee50b2e493eff61ea34d6eb54c1
2020-03-06 02:00:23 -08:00
Lukas Piatkowski
bdb3b625d1 blobstore: cover more blobstores to make them OSS buildable
Reviewed By: farnz

Differential Revision: D20221288

fbshipit-source-id: 708be6d429e673dcb4201b88541dff2bf9fca153
2020-03-06 01:33:38 -08:00
Lukas Piatkowski
7ddcdd818c mononoke: make sql_ext OSS buildable
Summary: separate out the Facebook-specific pieces of the sql_ext crate

Reviewed By: ahornby

Differential Revision: D20218219

fbshipit-source-id: e933c7402b31fcd5c4af78d5e70adafd67e91ecd
2020-03-06 01:33:38 -08:00
svcscm
cda098386f Updating submodules
Summary:
GitHub commits:

11c3570936
1bab211d77

Reviewed By: yns88

fbshipit-source-id: 23ba153d0a2b8217552f1a657167f5543ca498be
2020-03-06 01:33:37 -08:00
svcscm
62c61dd58e Updating submodules
Summary:
GitHub commits:

48d2547744
0b4e86c218
6a544e6fc7
e171a219d5
5b2efc3c29

Reviewed By: yns88

fbshipit-source-id: 76f20c7ae811ffcf6614f8f8dc02c9bfa88384d5
2020-03-05 18:37:23 -08:00
Durham Goode
a7e62ec3de hggit: add ability to skip commits using hggit.skipgithashes
Summary:
We've had cases where a git commit goes in that shouldn't be translated
to Mercurial. Let's add an option to skip the commit. Instead of skipping it
entirely (which would require complicated logic to then parent the following
commit on the last converted commit), let's just convert the skipped commit as
an empty commit. This should cover the cases we've encountered so far.

Reviewed By: krallin

Differential Revision: D20261743

fbshipit-source-id: da401863b09c2ac727aae1ceef10a0e8d8f98a7e
2020-03-05 15:06:30 -08:00
David Tolnay
754a755eee rust: Rename tokio_preview:: to tokio::
Summary:
Context: https://fb.workplace.com/groups/rust.language/permalink/3338940432821215/

This codemod replaces all dependencies on `//common/rust/renamed:tokio-preview` with `fbsource//third-party/rust:tokio-preview` and their uses in Rust code from `tokio_preview::` to `tokio::`.

This does not introduce any collisions with `tokio::` meaning 0.1 tokio because D20235404 previously renamed all of those to `tokio_old::` in crates that depend on both 0.1 and 0.2 tokio.

This is the tokio version of what D20213432 did for futures.

Codemod performed by:

```
rg \
    --files-with-matches \
    --type-add buck:TARGETS \
    --type buck \
    --glob '!/experimental' \
    --regexp '(_|\b)rust(_|\b)' \
| sed 's,TARGETS$,:,' \
| xargs \
    -x \
    buck query "labels(srcs, rdeps(%Ss, //common/rust/renamed:tokio-preview, 1))" \
| xargs sed -i 's,\btokio_preview::,tokio::,'

rg \
    --files-with-matches \
    --type-add buck:TARGETS \
    --type buck \
    --glob '!/experimental' \
    --regexp '(_|\b)rust(_|\b)' \
| xargs sed -i 's,//common/rust/renamed:tokio-preview,fbsource//third-party/rust:tokio-preview,'
```

Reviewed By: k21

Differential Revision: D20236557

fbshipit-source-id: 15068b93a0a944d6249a1d9f63840a4c61c9c1ba
2020-03-05 14:25:10 -08:00
svcscm
a22c4becec Updating submodules
Summary:
GitHub commits:

db49eaf301
40f62d20c5
22d4322fd5
df865c4e34

Reviewed By: yns88

fbshipit-source-id: e13888e95abb9303faebf2b2eaa2f241e13b3fc5
2020-03-05 13:52:59 -08:00
Jun Wu
75e4ffc17f indexedlog: change IndexDef.lag_threshold back from entries to bytes
Summary:
I thought the index function could be the bottleneck. However, the Log reading
(xxhash, decoding vlqs) can be much slower for very long entries. Therefore
using bytes as the lag threshold is better. It does leaked the Log
implementation details (how it encodes an entry) to some extend, though.

Reverts D20042045 and D20043116 logically. The lagging calculation is using
the new Index::get_original_meta API, which is easier to verify correctness
(In fact, it seems the old code is wrong - it might skip Index flushes if
sync() is called multiple times without flushing).

This should mitigate an issue where a huge entry (generated by `hg trace`) in
blackbox does not get indexed in time and cause performance regressions.

Reviewed By: DurhamG

Differential Revision: D20286508

fbshipit-source-id: 7cd694b58b95537490047fb1834c16b30d102f18
2020-03-05 13:29:48 -08:00