Commit Graph

56318 Commits

Author SHA1 Message Date
Aida Getoeva
3e510491cc scs/history: don't buffer stream if there is no need
Summary:
Time filters for file history require fetching changeset or changeset info to decide whether to include the commit into response. To speed up the process instead of sequential mapping, I buffer the map stream in batches of 100.
However it is unfortunate to fetch additional 100 history changesets if there is no time filters and only several commits were requested. Keeping also in mind that the most of the requests don't care about time.
Avoiding that would speed up the history generation,

I changed the changeset_path API so now it just returns the stream of changeset contexts. And commit_path API for history if there is no time filters collects everything to vector, otherwise applies them and also collects to vector. Then this vector is converted into response using FuturesOrdered.

Reviewed By: StanislavGlebik

Differential Revision: D20287497

fbshipit-source-id: 0c6b1315eccddb48f67bf5fa732bdf7c9a54a489
2020-03-10 10:03:05 -07:00
Genevieve Helsel
bbd450be88 cli logging set -> list for JsonTelemetryLogger
Summary: "tags" are stored as sets, but must be serialized as lists in python. This only affects the `ExternalTelemetryLogger`, which is used on mac builds.

Reviewed By: simpkins

Differential Revision: D20351645

fbshipit-source-id: b097bd6aeb6d109323186f4ae4ef959f831ead2b
2020-03-10 09:57:03 -07:00
Stanislau Hlebik
4241ca0272 mononoke: add repo name in BlobRepo
Summary:
A lot of callsites want to know repo name. Currently they need to pass it from
the place where repo was initialized, and that's quite awkward, and in some
places even impossible (i.e. in derived data, where I want to log reponame).

This diff adds reponame in BlobRepo

Reviewed By: krallin

Differential Revision: D20363065

fbshipit-source-id: 5e2eb611fb9d58f8f78638574fdcb32234e5ca0d
2020-03-10 08:32:33 -07:00
Stanislau Hlebik
a7f67cb698 mononoke: remove in_memory_writes* method
Summary: DangerousOverride trait is better

Reviewed By: krallin

Differential Revision: D20362886

fbshipit-source-id: f083936bce60faa0c60ccd4672704fc642b68234
2020-03-10 07:51:28 -07:00
Thomas Orozco
6f5c623899 mononoke/repo_listener: track request success / failure in ODS
Summary:
We track this in Scuba right now (and alarm on it), but tracking it in ODS will
make it easier to incorporate in our canary and post-release health check
workflow.

Reviewed By: StanislavGlebik

Differential Revision: D20361803

fbshipit-source-id: 99fb514d41f9cda42c3c9a82f3b8d6681285430a
2020-03-10 06:25:11 -07:00
Mateusz Kwapich
9fd7f0d2b4 improve the check for conflicts during insert
Summary:
Before we assumed that if the rows_affected length doesn't match the number of
entries we were trying to insert we have a conflict. Let's verify if we really
have conflict or we're trying to insert the same entry twice.

Reviewed By: krallin

Differential Revision: D20343219

fbshipit-source-id: 19e032439fdd65f5fe1afe1a10b401bc2fe33462
2020-03-10 05:47:05 -07:00
Mateusz Kwapich
e1bf77097f test showing the blobimport problem.
Summary: Running blobimport twice on the same commit seems to cause problems.

Reviewed By: krallin

Differential Revision: D20343218

fbshipit-source-id: 4d572630e7c15c219bee8db15cc879b2cb8602fe
2020-03-10 05:47:05 -07:00
Mark Thomas
9fc8716e85 debugnetwork: show how long it took to query server master bookmark
Summary:
It might be useful to know how long the end-to-end wireproto command to find
the master bookmark took, so log that.

Reviewed By: quark-zju

Differential Revision: D20344686

fbshipit-source-id: 8459a378a0c828a929eee5f9ffd34875a5b8d3cc
2020-03-10 05:36:23 -07:00
Mark Thomas
ed4d2ae9aa debugnetwork: allow multiple tests within a connection to aid warmup
Summary:
For high latency connections we will need to warm up the connection before
starting the download or upload test.  Facilitate this by making it possible to
run multiple tests within the same connection.

This changes the protocol for the speed-test command to be line-oriented commands.

Reviewed By: farnz

Differential Revision: D20344687

fbshipit-source-id: 1d2a815736caf974ed1aaaaf365b86343d41fe02
2020-03-10 05:36:23 -07:00
Alex Hornby
b8ca854c0b mononoke: walker: add ability to walk all published bookmarks
Summary: Add ability to walk all published bookmarks as there may be multiple important bookmarks

Reviewed By: krallin

Differential Revision: D20249806

fbshipit-source-id: aff2ee1ec7d51a9e4fb6e1e803612abd207fd6cb
2020-03-10 05:26:35 -07:00
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