Commit Graph

392 Commits

Author SHA1 Message Date
Harvey Hunt
5487586135 mononoke: Don't use rate limiting prefix from config
Summary:
The rate limits for commits support the ability to apply a specific
prefix to the load limiting category. However, we haven't used this
functionality. Remove it to make subsequent work on the rate limiting logic
easier to implement.

Reviewed By: StanislavGlebik

Differential Revision: D29396506

fbshipit-source-id: ac518ccd74f6fac49ab85f87f1500787b5db955e
2021-07-05 07:09:53 -07:00
Xavier Deguillard
41897e3acc third-party: patch os_info to properly support Centos Stream
Summary:
This is just updating the os_info crate to my fork with a fix for Centos
Stream: https://github.com/stanislav-tkach/os_info/pull/267

Reviewed By: quark-zju

Differential Revision: D29410043

fbshipit-source-id: 3642e704f5a056e75fee4421dc59020fde13ed5e
2021-06-25 21:07:33 -07:00
Thomas Orozco
8c83bd9a1c third-party/rust: update Tokio to 1.7.1
Summary: There is a regression in 1.7.0 (which we're on at the moment) so we might as well update.

Reviewed By: zertosh, farnz

Differential Revision: D29358047

fbshipit-source-id: 226393d79c165455d27f7a09b14b40c6a30d96d3
2021-06-25 06:17:41 -07:00
Andres Suarez
fc37fea20c Update itertools 0.8.2 to 0.10.1
Reviewed By: dtolnay

Differential Revision: D29286012

fbshipit-source-id: 6923c0b750692e6932e85fd539b076b172ff43b7
2021-06-22 04:09:00 -07:00
Andrew Gallagher
05cf7acd77 object-0.25.3: patch SHT_GNU_versym entsize fix
Summary:
Pull in a patch which fixes writing out an incorrect entsize for the
`SHT_GNU_versym` section:
ddbae72082

Reviewed By: igorsugak

Differential Revision: D29248208

fbshipit-source-id: 90bbaa179df79e817e3eaa846ecfef5c1236073a
2021-06-21 09:31:49 -07:00
Andres Suarez
845128485c Update bytecount
Reviewed By: dtolnay

Differential Revision: D29213998

fbshipit-source-id: 92e7a9de9e3d03f04b92a77e16fa0e37428fe2fb
2021-06-17 19:50:32 -07:00
Davide Cavalca
b82c5672fc Update several rust crate versions
Summary: Update versions for several of the crates we depend on.

Reviewed By: danobi

Differential Revision: D29165283

fbshipit-source-id: baaa9fa106b7dad000f93d2eefa95867ac46e5a1
2021-06-17 16:38:19 -07:00
CodemodService Bot
4c4dfd45ad Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D29158387

fbshipit-source-id: 48a0b590e01083d762bbed2b7e272cbefc72641f
2021-06-16 04:50:15 -07:00
Alex Hornby
4457092322 rust: revert zstd crates
Summary: revert the zstd crates back to previous version

Reviewed By: johansglock

Differential Revision: D29038514

fbshipit-source-id: 3cbc31203052034bca428441d5514557311b86ae
2021-06-11 04:39:54 -07:00
Yan Soares Couto
84a8476d4e Don't use Arc<BlobRepo>, but BlobRepo directly
Summary:
BlobRepo is already easily cloneable (actually holds an arc inside).

This should also make code a little prettier, where we needed to use `(*blob_repo).clone()` instead of just `blob_repo.clone()`.

Reviewed By: StanislavGlebik

Differential Revision: D28930384

fbshipit-source-id: 59f95d10576a3f71808d0d26d36358421673351e
2021-06-09 05:16:13 -07:00
Alex Hornby
f89dbebae8 rust: update zstd bindings to 1.5.0
Summary: Update to latest version.  This includes a patch to async-compression crate from [my PR updating it](https://github.com/Nemo157/async-compression/pull/125), I will remove once the crate is released.

Reviewed By: mitrandir77

Differential Revision: D28897019

fbshipit-source-id: 07c72f2880e7f8b85097837d084178c6625e77be
2021-06-08 07:57:29 -07:00
CodemodService Bot
254d2a37ad Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D28928316

fbshipit-source-id: 6da6c9a5321d722a3dfd816b49f3994df98c7471
2021-06-07 02:19:59 -07:00
Jeremy Fitzhardinge
c652f9a11f third-party/rust: update time to 0.2
Summary:
Time 0.2 is current, and 0.1 is long obsolete. Unfortunately there's a
large 0.1 -> 0.2 API change, so I preserved 0.1 and updated the targets of its
users. Also unfortunate that `chrono` has `oldtime` as a default feature, which
makes it use `time-0.1`'s `Duration` type. Excluding it from the features
doesn't help because every other user is specifying it by default.

Reviewed By: dtolnay

Differential Revision: D28854148

fbshipit-source-id: 0c41ac6b998dfbdcddc85a22178aadb05e2b2f2b
2021-06-03 13:52:54 -07:00
Yan Soares Couto
f005f37d74 Use InnerRepo on WarmBookmarksCache instead of BlobRepo
Summary:
Currently bookmark warmers receives a `BlobRepo`. This diff makes it receive an `InnerRepo`, but does no logic changes.

This will be useful as fields are moved from `BlobRepo` to `InnerRepo`, and will also be useful for accessing skiplists from warmers, as I plan to do on the next diff.

Reviewed By: StanislavGlebik

Differential Revision: D28796543

fbshipit-source-id: dbe5bec9fc34da3ae51e645ea09b03e2bb620445
2021-06-03 10:53:24 -07:00
Thomas Orozco
846a983d67 thrift/lib/rust: update to Bytes 1.x
Summary:
Like it says in the title. The API between Bytes 1.x has changed a little bit,
but the concepts are basically the same, so we just need to change the
callsites that were calling `bytes()` and have them ask for `chunk()` instead.

This diff attempts to be as small as it can (and it's already quite big). I
didn't attempt to update *everything*: I only updated whatever was needed to
keep `common/rust/tools/scripts/check_all.sh` passing.

However, there are a few changes that fall out of this. I'll outline them here:

## `BufExt`

One little caveat is the `copy_to_bytes` we had on `BufExt`. This was
introduced into Bytes 1.x (under that name), but we can't use it here directly.

The reason we can't is because the instance we have is a `Cursor<Bytes>`, which
receives an implementation of `copy_from_bytes` via:

```
impl<T: AsRef<[u8]>> Buf for std::io::Cursor<T>
```

This means that implementation isn't capable of using the optimized
`Bytes::copy_from_bytes` which doesn't do a copy at all. So, instead, we need
to use a dedicated method on `Cursor<Bytes>`: `copy_or_reuse_bytes`.

## Calls to `Buf::to_bytes()`

This method is gone in Bytes 1.x, and replaced by the idiom
`x.copy_to_bytes(x.remaining())`, so I updated callsites of `to_bytes()`
accordingly.

## `fbthrift_ext`

This set of crates provides transports for Thrift calls that rely on Tokio 0.2
for I/O. Unfortunately, Tokio 0.2 uses Bytes 0.5, so that doesn't work well.

For now, I included a copy here (there was only one required, when reading from
the socket). This can be removed if we update the whole `fbthrift_ext` stack to
Bytes 1.x. fanzeyi had been wanting to update this to Tokio 1.x, but was blocked on `thrift/lib/rust` using Bytes 0.5, and confirmed that the overhead of a copy here is fine (besides, this code can now be updated to Tokio 1.x to remove the copy).

## Crates using both Bytes 0.5 & Bytes 1.x

This was mostly the case in Mononoke. That's no coincidence: this is why I'm
working on this. There, I had to make changes that consist of removing Bytes
0.5 to Bytes 1.x copies.

## Misuse of `Buf::bytes()`

Some places use `bytes()` when they probably mean to use `copy_to_bytes()`. For
now, I updated those to use `chunk()`, which keeps the behavior the same but
keeps the code buggy. I filed T91156115 to track fixing those (in all
likelihood I will file tasks for the relevant teams).

Reviewed By: dtolnay

Differential Revision: D28537964

fbshipit-source-id: ca42a614036bc3cb08b21a572166c4add72520ad
2021-05-20 09:44:41 -07:00
Thomas Orozco
bcc532d126 mononoke: yield periodically on repo client streams
Summary:
Like it says in the title. This updates various streams so that they yield
after 10+ ms on CPU, thus ensuring that they don't starve other tasks of
runtime.

Reviewed By: johansglock

Differential Revision: D28441879

fbshipit-source-id: 78a8cdaefbe37d4768211dfa8a87c045ed898d57
2021-05-17 04:17:40 -07:00
Stanislau Hlebik
cc697dc11b mononoke: yield after warn_expensive_getbundle to mitigate S231752
Summary:
One more attempt to mitigate S231752.
From the debugging we did locally it seems that warning about expensive
getbundle might prevent keep alives from being send to the client.
adding yield seem to mitigate the issue locally.
We are not 100% sure it will actually mitigate the sev, but it seems like a
cheap and safe thing to try.

Reviewed By: krallin

Differential Revision: D28438570

fbshipit-source-id: 14f613222e8f69c4cbe490d8fa608d79c30b1a4d
2021-05-14 04:55:48 -07:00
Stanislau Hlebik
eab97b6123 mononoke: sync changeset implementation for megarepo
Summary: First stab at implementing sync changeset functionality for megarepo.

Reviewed By: ikostia

Differential Revision: D28357210

fbshipit-source-id: 660e3f9914737929391ab1b29f891b3b5dd47638
2021-05-13 10:04:21 -07:00
Stanislau Hlebik
8a158fae83 mononoke: make sure partial getbundle optimization traverses the commits in generation number order
Summary:
Partial getbundle optimization didn't work correctly if one merge parent was an ancestor
of another - it might return a parent commit before a child commit. Say we had a graph like this

```
C
| \
| B
| /
A
```

Previously partial getbundle optimization could have visited A before it
visited B, and returned commits in the wrong order, which in turn would lead to
"hg pull" failures. The reason for that is that we don't order commits by generation number.

This diff fixes it by using UniqueHeap to sort commits by generation number
before returning them. Also note that as the name suggests UniqueHeap stores
only unique values in the heap, so we don't need to keep separate `visited`
hashset

Reviewed By: krallin

Differential Revision: D28378145

fbshipit-source-id: 9467fb7cfa8386e9e2725b80f386240b522ff3ee
2021-05-12 04:51:54 -07:00
Stanislau Hlebik
25bea26213 mononoke: allow duplicate filenodes to be sent
Reviewed By: krallin

Differential Revision: D28249888

fbshipit-source-id: 57e9976dba936c1fae4e3176ec9ea4d4b355c6fa
2021-05-06 03:31:19 -07:00
Stanislau Hlebik
d17de2cdb2 mononoke: avoid duplicates in get_manifests_and_filenodes
Reviewed By: krallin

Differential Revision: D28249720

fbshipit-source-id: b07cc51afdb174a4ff6f00473cf823a02f4e4d4e
2021-05-06 03:31:19 -07:00
Alex Hornby
da5dac311b rust: remove patch for async-compression
Summary: Upstream crate has landed my PR for zstd 1.4.9 support and made a release, so can remove this patch now.

Reviewed By: ikostia

Differential Revision: D28221163

fbshipit-source-id: b95a6bee4f0c8d11f495dc17b2737c9ac9142b36
2021-05-05 12:20:34 -07:00
Toan Mai
410f7c5c61 Imported a mysql_common patch to support FromRow for tuples up to arity 16 (#23)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/23

Pull Request resolved: https://github.com/facebookincubator/resctl/pull/8081

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/82

Imported a mysql_common patch to support FromRow for tuples upto arity 16
Context: https://fburl.com/zfnw7r86

Followed the guide: https://www.internalfb.com/intern/wiki/Rust-at-facebook/Managing_fbsource_third-party_with_Reindeer/#maintaining-local-change

Reviewed By: marcelogomez

Differential Revision: D28094262

fbshipit-source-id: fed48e3950e8a3ba3d7a15407522167e5ae41a98
2021-05-05 10:32:48 -07:00
Alex Hornby
394ff15823 mononoke: make phases take iterator get_public_raw
Summary: It was requesting a slice but always converted it to an Iterator anyway.  Receiving an iterator saves constructing a temporary Vec both here and later in the stack

Reviewed By: krallin

Differential Revision: D28127582

fbshipit-source-id: 625c1f17f1ded973f8b2aa13566928af0df83aec
2021-05-05 09:52:36 -07:00
Stanislau Hlebik
f4c799dffa mononoke: record how long saving the raw bundle took
Reviewed By: krallin

Differential Revision: D28215994

fbshipit-source-id: 5be23dd10eeb483cd17926cb064ecfe9f566cad4
2021-05-05 03:03:47 -07:00
Gus Wynn
cbbb45206b slog max_level_debug -> trace
Reviewed By: Imxset21

Differential Revision: D28097080

fbshipit-source-id: 7d417f8256922926cf379d9c2fb3249f6d2544ef
2021-05-03 10:30:21 -07:00
Thomas Orozco
9c7aa6aaf7 third-party/rust: remove patches for Tokio 0.2 & Hyper 0.2
Summary:
We used to carry patches for Tokio 0.2 to add support for disabling Tokio coop
(which was necessary to make Mononoke work with it), but this was upstreamed
in Tokio 1.x (as a different implementation), so that's no longer needed. Nobody
else besides Mononoke was using this.

For Hyper we used to carry a patch with a bugfix. This was also fixed in Tokio
1.x-compatible versions of Hyper. There are still users of hyper-02 in fbcode.
However, this is only used for servers and only when accepting websocket
connections, and those users are just using Hyper as a HTTP client.

Reviewed By: farnz

Differential Revision: D28091331

fbshipit-source-id: de13b2452b654be6f3fa829404385e80a85c4420
2021-04-29 08:07:45 -07:00
Thomas Orozco
ffed22260d third-party/rust: remove Gotham 0.2
Summary:
This used to be used by Mononoke, but we're now on Tokio 1.x and on
corresponding versions of Gotham so it's not needed anymore.

Reviewed By: farnz

Differential Revision: D28091091

fbshipit-source-id: a58bcb4ba52f3f5d2eeb77b68ee4055d80fbfce2
2021-04-29 08:07:45 -07:00
Aida Getoeva
54c4a17e16 mononoke: remove async on FbConstruct methods
Summary: The methods don't do anything async anymore, let's remove `async`.

Reviewed By: krallin

Differential Revision: D28026899

fbshipit-source-id: 571eb2a1ba499876042c6e89770c803ac731cfe3
2021-04-28 11:14:52 -07:00
Thomas Orozco
0f44a4f106 mononoke: update to tokio 1.x
Summary:
NOTE: there is one final pre-requisite here, which is that we should default all Mononoke binaries to `--use-mysql-client` because the other SQL client implementations will break once this lands. That said, this is probably the right time to start reviewing.

There's a lot going on here, but Tokio updates being what they are, it has to happen as just one diff (though I did try to minimize churn by modernizing a bunch of stuff in earlier diffs).

Here's a detailed list of what is going on:

- I had to add a number `cargo_toml_dir` for binaries in `eden/mononoke/TARGETS`, because we have to use 2 versions of Bytes concurrently at this time, and the two cannot co-exist in the same Cargo workspace.
- Lots of little Tokio changes:
  - Stream abstractions moving to `tokio-stream`
  - `tokio::time::delay_for` became `tokio::time::sleep`
  - `tokio::sync::Sender::send` became `tokio::sync::Sender::broadcast`
  - `tokio::sync::Semaphore::acquire` returns a `Result` now.
  - `tokio::runtime::Runtime::block_on` no longer takes a `&mut self` (just a `&self`).
  - `Notify` grew a few more methods with different semantics. We only use this in tests, I used what seemed logical given the use case.
- Runtime builders have changed quite a bit:
  - My `no_coop` patch is gone in Tokio 1.x, but it has a new `tokio::task::unconstrained` wrapper (also from me), which I included on  `MononokeApi::new`.
  - Tokio now detects your logical CPUs, not physical CPUs, so we no longer need to use `num_cpus::get()` to figure it out.
- Tokio 1.x now uses Bytes 1.x:
  - At the edges (i.e. streams returned to Hyper or emitted by RepoClient), we need to return Bytes 1.x. However, internally we still use Bytes 0.5 in some places (notably: Filestore).
  - In LFS, this means we make a copy. We used to do that a while ago anyway (in the other direction) and it was never a meaningful CPU cost, so I think this is fine.
  - In Mononoke Server it doesn't really matter because that still generates ... Bytes 0.1 anyway so there was a copy before from 0.1 to 0.5 and it's from 0.1 to 1.x.
  - In the very few places where we read stuff using Tokio from the outside world (historical import tools for LFS), we copy.
- tokio-tls changed a lot, they removed all the convenience methods around connecting. This resulted in updates to:
  - How we listen in Mononoke Server & LFS
  - How we connect in hgcli.
  - Note: all this stuff has test coverage.
- The child process API changed a little bit. We used to have a ChildWrapper around the hg sync job to make a Tokio 0.2.x child look more like a Tokio 1.x Child, so now we can just remove this.
- Hyper changed their Websocket upgrade mechanism (you now need the whole `Request` to upgrade, whereas before that you needed just the `Body`, so I changed up our code a little bit in Mononoke's HTTP acceptor to defer splitting up the `Request` into parts until after we know whether we plan to upgrade it.
- I removed the MySQL tests that didn't use mysql client, because we're leaving that behind and don't intend to support it on Tokio 1.x.

Reviewed By: mitrandir77

Differential Revision: D26669620

fbshipit-source-id: acb6aff92e7f70a7a43f32cf758f252f330e60c9
2021-04-28 07:36:31 -07:00
Alex Hornby
bc85aade21 rust: update to zstd to 0.7.0+zstd.1.4.9
Summary:
Update the zstd crates.

This also patches async-compression crate to point at my fork until upstream PR https://github.com/Nemo157/async-compression/pull/117 to update to zstd 1.4.9 can land.

Reviewed By: jsgf, dtolnay

Differential Revision: D27942174

fbshipit-source-id: 26e604d71417e6910a02ec27142c3a16ea516c2b
2021-04-22 14:34:06 -07:00
Alex Hornby
45f521ddde mononoke: enable default patch.crates-io for internal Cargo.tomls
Reviewed By: quark-zju

Differential Revision: D27915811

fbshipit-source-id: 3f830def66c1c5f0569925c42cc8335ee585e0e7
2021-04-22 10:59:42 -07:00
Thomas Orozco
8ef8706e6e mononoke: add a new session class for WarmBookmarksCache
Summary:
I'd like to be able to track the proportion of traffic coming to bookmarks from
warm bookmarks cache vs. from elsewhere. We don't have a great abstraction to
pass this via the CoreContext at this time, but the SessionClass seems like a
pretty good fit.

Indeed, since it's always available in the CoreContext, and can be freely
mutated without having to rebuild the whole session. Besides, it aligns pretty
well with the existing use cases we have for SessionClass, which is to give you
different level of service depending on who you are.

Reviewed By: StanislavGlebik

Differential Revision: D27938413

fbshipit-source-id: a9dcc5a10c8d1459ee9586324a727c668e2e4e40
2021-04-22 08:13:09 -07:00
Stanislau Hlebik
70e41864c0 mononoke: use get_public_raw in getbundle
Summary:
Instead of using get_public method which queries bookmarks let's call
get_public_raw instead, which just does a phases fetch from a local db.

See previous diff for more motivation

Reviewed By: krallin

Differential Revision: D27821547

fbshipit-source-id: a71c8c9ad283259e9be98e63c9c72428e35c6142
2021-04-20 10:17:29 -07:00
Stanislau Hlebik
6183cd68e4 mononoke: log how manynodes were requested in known call to perf counter
Summary:
We didn't log it to perf counters log, and that makes it hard to aggregate,
show distributions etc

Let's start doing that

Reviewed By: krallin

Differential Revision: D27856968

fbshipit-source-id: 82fbba70154ee011073f3122256bd296bbb938ae
2021-04-20 04:06:54 -07:00
Stanislau Hlebik
5c7ff35af8 mononoke: copy bonsai changeset from prod repo to backup repo if they don't match
Summary:
To prevent bonsai changeset divergence between prod and backup repo by copying
bonsais from prod repo directly during hg sync job push.

See more details about motivation in D27824210

Reviewed By: ikostia

Differential Revision: D27852341

fbshipit-source-id: 93e0b1891008858eb99d5e692e4dd60c2e23f446
2021-04-19 09:00:11 -07:00
Stanislau Hlebik
d93c5a3784 mononoke: add public phase warmer
Reviewed By: krallin

Differential Revision: D27821286

fbshipit-source-id: ece394a2f7f46a3b67d6074a615741c56dc7e3d8
2021-04-16 08:20:48 -07:00
Kostia Balytskyi
fc3908e9fa repo_client: log full gettreepack args to scuba in verbose mode
Summary:
This will allow us to have greater visibility into what's going on when there are production issues.

Note: for getpack, the params data model is `[MPath, [Node]]`. In practice there seems to always just be 1 node per mpath. However, to preserve the mapping, I log every mpath in a separate sample.

Reviewed By: ahornby

Differential Revision: D26690685

fbshipit-source-id: 36616256747b61390b0435467892daeff2b4dd07
2021-04-14 08:29:59 -07:00
Stanislau Hlebik
0450243694 mononoke: fix sql query for streaming changelog
Summary:
Previously this query failed because it tried to convert bytes to int, and our
mysql wrapper doesn't support that.
Let's cast it instead

Reviewed By: krallin

Differential Revision: D27736863

fbshipit-source-id: 66a7cb33c0f623614f292511e18eb62e31ea582f
2021-04-13 11:15:00 -07:00
Stanislau Hlebik
85469374e9 mononoke: add leases to x-repo-sync
Reviewed By: ikostia

Differential Revision: D27677897

fbshipit-source-id: e86220f23f5950130f2f4ead2743f9a9b86abed7
2021-04-12 12:08:34 -07:00
Stanislau Hlebik
1876314c01 mononoke: allow blocking too large known calls
Summary:
Previously we ran into an issue where client has sent us too large known
request, and we passed it all the way to the mysql.

Mysql slow log shows that we have quite a few slow queries
(https://fburl.com/scuba/mysql_slow_log/w0ugmc1i), so it might be that these
requests are still coming, but because of the problems in the logging (see
previous diff), we can't know it for sure.

In any case, adding a knob like that can be useful

Reviewed By: farnz

Differential Revision: D27650806

fbshipit-source-id: c4c82b7b5781a85c349abb4e5fa534b5e8f125a0
2021-04-08 10:12:26 -07:00
Stanislau Hlebik
9b02233ed2 mononoke: deduplicate known* methods code
Summary:
the code is almost the same, so it would be good to deduplicate it. The
duplication let to the annoying differences in logging - i.e. we logged how
many nodes were sent to us in `known` call but not in `knownnodes` call.

Reviewed By: farnz

Differential Revision: D27650583

fbshipit-source-id: 5e2e3be3b9fd66631364d23f34d241c27e370340
2021-04-08 09:37:49 -07:00
Harvey Hunt
7358178f4a mononoke: Remove external sync logic
Summary:
Now that the `hg_external_sync` jobs are gone we can delete the code
in Mononoke that behaves differently when a sync job connects.

Reviewed By: StanislavGlebik

Differential Revision: D27500506

fbshipit-source-id: 443fb54577833dbf44ece6ae90a5f25ffed38cd5
2021-04-08 09:17:11 -07:00
Aida Getoeva
1f0a3fb467 mononoke: log error if couldn't fetch repo lock status
Summary:
Currently if we failed to fetch the repo status we only see "Repo is marked as read-only: Failed to fetch repo lock status" error, which is not very informative. Example of the error in production: P385612782.

Let's log the error.

Reviewed By: krallin

Differential Revision: D27621996

fbshipit-source-id: 85d9f0fe39397759da1b51e197f9188761678715
2021-04-08 04:03:18 -07:00
Liubov Dmitrieva
781cd19f2d Add support for wantsunhydratedcommits in Mononke
Summary:
Add support for returning unhydrated draft commits if requested by the client using a config option 'wantsunhydratedcommits'

This is needed to support slow enabling it for some clients like OnDemand.

Reviewed By: StanislavGlebik

Differential Revision: D27621442

fbshipit-source-id: 672129c8bfcbcdb4cee3ba1b092dac16c0b1877d
2021-04-08 03:48:07 -07:00
Stanislau Hlebik
47eee63dc2 mononoke: log file size to the post push scribe logging
Summary:
We already log file count, but file sizes is another useful piece of
information.

I evaluated two options - either do as I did in this diff or just change ScribeToScuba
logging python script to query scs to get file sizes. I opted for option #1
mainly because scs doesn't have a method to query file sizes for many files at once, and
querying one by one might be too expensive. We can add a method like that, but
that's a bit of a bigger change that I'd like.

Reviewed By: andll

Differential Revision: D27620507

fbshipit-source-id: 2618e60845bc293535b190d4da85df5667a7ab60
2021-04-07 23:34:40 -07:00
Mark Juggurnauth-Thomas
94ea52cdd4 repo_client/mononoke_repo: remove dependency on blobrepo_factory
Summary:
This import is only used for the `ReadOnlyStorage` type, which is canonically
defined in `blobstore_factory`.

Reviewed By: krallin

Differential Revision: D27363466

fbshipit-source-id: 7cb1effcee6d39de92b471fecfde56724d24a6a4
2021-04-07 14:01:47 -07:00
Thomas Orozco
3f710ee216 mononoke/repo_client: spawn check_lock_repo
Summary:
This is ... a stopgap :( There is probably some slow polling happening in
unbundle_future, and this causes us to fail to use our connection in time in
check_lock_repo...

Reviewed By: ahornby, StanislavGlebik

Differential Revision: D27620728

fbshipit-source-id: b747011405328b60419a99f0e5dbbaf64d53196a
2021-04-07 08:37:28 -07:00
Thomas Orozco
c934b67e5b mononoke: remove all trivial usage of async-unit
Summary:
I'd like to just get rid of that library since it's one more place where we
specify the Tokio version and that's a little annoying with the Tokio 1.x
update. Besides, this library is largely obsoleted by `#[fbinit::test]` and
`#[tokio::test]`.

Reviewed By: farnz

Differential Revision: D27619147

fbshipit-source-id: 4a316b81d882ea83c43bed05e873cabd2100b758
2021-04-07 07:26:57 -07:00
Stanislau Hlebik
a58b18a974 mononoke: verify bonsai changesets during replay
Differential Revision: D27362903

fbshipit-source-id: 136207fbab3f729e8575d8d06596ce790c3f4783
2021-03-29 12:39:19 -07:00