Commit Graph

56573 Commits

Author SHA1 Message Date
svcscm
4ea09bcdda Updating submodules
Summary:
GitHub commits:

a0f0d16f16
6c115007ab

Reviewed By: wittgenst

fbshipit-source-id: 5e26ab507c2f7dedf23dc3a7a1e3bd8cac89e042
2020-03-24 18:30:03 -07:00
svcscm
fa0fe28988 Updating submodules
Summary:
GitHub commits:

a7fe041239
4a8222b4d4

Reviewed By: wittgenst

fbshipit-source-id: 239fec8902d797c300c1f178db65b5e5edbd055e
2020-03-24 14:58:00 -07:00
Stefan Filip
031c6b2fb4 segmented_changelog: add dependency to scm/lib/dag
Summary:
It's going to be useful to share certain structures between client and server.
Looking ahead, the plan is to share the segment graph along with all the
algorithms implemented for it.

Reviewed By: StanislavGlebik

Differential Revision: D20550951

fbshipit-source-id: f498a6b0cba1bcdd35fc9720125b223d7e891a44
2020-03-24 13:58:07 -07:00
Stefan Filip
c400809eba dag: rename child index iteration to iter_master_flat_segments_with_parent
Summary:
`iter_segments_with_parent` has a few more conditions attached to it than the
name would imply. We are renaming it to give a better sense of its true
behavior.

Reviewed By: quark-zju

Differential Revision: D20547631

fbshipit-source-id: 406f46b9de5efc9e8e6a8c4bc22ab18fa5bc54bb
2020-03-24 13:58:07 -07:00
Stefan Filip
59ff2a8571 dag: remove_non_master implementation for
Summary: Also adding better tests for non master entries.

Reviewed By: quark-zju

Differential Revision: D20504483

fbshipit-source-id: 60d4a20aecb00f7750db2fff5d3832aac99d00e2
2020-03-24 13:58:06 -07:00
Stefan Filip
03c1e1cac5 dag: iterator implementations for InProcessStore
Summary:
The main question I had while writing the tests was whether we expect a
specific order for Segments for `iter_segments_with_parent`. `InProcessStore`
will return the segments in the order that they were inserted.

Reviewed By: quark-zju

Differential Revision: D20501401

fbshipit-source-id: 48ceb78f3191c7425c1488a3392cf3167f7e7268
2020-03-24 13:58:06 -07:00
Stefan Filip
5f4e706f81 dag: Add InProcessStore as iddagstore
Summary:
First 6 methods implemented from the IdDagStore trait for the InProcessStore.

Any suggestions welcome.

Reviewed By: quark-zju

Differential Revision: D20499228

fbshipit-source-id: cb536a3a0136077ada78934d82a25d079a5bc809
2020-03-24 13:58:06 -07:00
Stefan Filip
3dcb56535e dag: add descriptions to IdDagStore methods
Summary: Documentation.

Reviewed By: quark-zju

Differential Revision: D20499926

fbshipit-source-id: ebbb7a1249109bd56ff459a659e0c628c2974179
2020-03-24 13:58:05 -07:00
Aida Getoeva
fde579782f scs: fix the blank line in test-scs
Reviewed By: markbt

Differential Revision: D20628121

fbshipit-source-id: 6a9d72eab4d2ce8deb4640225080de32a96b9caf
2020-03-24 13:50:24 -07:00
Ratnadeep Joshi
17fd33424d Move py/ directory from eden/ to eden/fs
Summary: [edenfs] Move py/ directory from eden/ to eden/fs

Reviewed By: simpkins

Differential Revision: D20479925

fbshipit-source-id: 36abf7fe208c283f01c9bf415e2fcb1a8f4bdbae
2020-03-24 11:45:37 -07:00
Mark Thomas
2678dd7c2b cmdutil: use the new ascii renderer if HGPLAIN is set
Summary:
If `HGPLAIN` is set, and the non-legacy graph renderer is in use, use the ASCII
renderer to ensure compatible output on all platforms and configurations.

Reviewed By: farnz

Differential Revision: D20622425

fbshipit-source-id: b25a8d0526652bab07059492f7adbb684b5cbee7
2020-03-24 11:38:28 -07:00
Steven Troxler
7a2c1117f5 Asyncify benchmark_filestore::read
Summary:
At this point all future-returning `fn`s in `benchmark_filestore`
are async.

Reviewed By: krallin

Differential Revision: D20615922

fbshipit-source-id: 8b9998e4d8933e46f0c2612270faefcb061eae37
2020-03-24 10:36:09 -07:00
Steven Troxler
afd577121e Refactor benchmark_filestore. Asyncify.
Summary:
This diff is a combination of an asyncification and a refactor:
 - isolatedthe logic for setting `blob` (which gets overwritten
   5 times, often blocking on futures in the process) into it's own
   function `get_blob`, which I think makes it a lot easier to see
   which variables depend on one another.
 - push all the rest of the logic into an async function
   `run_benchmark_filestore`

Reviewed By: krallin

Differential Revision: D20615743

fbshipit-source-id: 9d0918e4078b8193c59758701c5dc5e744298d1d
2020-03-24 10:36:09 -07:00
Aida Getoeva
f06fed3a79 scs: fix test-scs.t
Summary: Fix test that was broken by D20557896

Reviewed By: krallin

Differential Revision: D20619387

fbshipit-source-id: 3fd7ee501144528b18b7162f73dcf3d251fd5f2f
2020-03-24 10:21:05 -07:00
Mateusz Kwapich
3d314761c3 introduce OperationKey
Summary:
From time to time we're experiencing the blobstore healer to crash
because its SQL queries timing out. The rootcause of the problem
is that the same blob_key may show up on the queue many times repeatedly
and the query is trying to select all occurences.

But, the original intention of blobstore healer is to act on a single
put operation across all blobstores. To be able to identify which
puts in the healer queue are part of the same operation we need
some unique id that we'll use per such operation, let's call it OperationKey.

corresponding configerator change to create db column: D20557659

NOTE: This diff has to be landed and rolled out first, before D20557700 is rolled out. I'm assuming that after some time since rolling out this diff all the rows in the production db will have proper `operation_key` value set.

Reviewed By: krallin

Differential Revision: D20557702

fbshipit-source-id: 404d9fdea6796b38193292d1bbd4b8cd4b5b3eb8
2020-03-24 10:07:31 -07:00
Steven Troxler
e82f190239 Asyncify stream internals in aliasverify
Summary:
In the previous diffs, I asyncified the api of all `fn`s in
`aliasverify`, but I still had old stream logic, which was hard to
read and required many clones of parameters to handle static lifetime
requirements.

This diff switches all the internal code over to new-style streams.

In the process of doing this, I was able to remove almost all of the
clones, and also switch `get_bounded` from needing to explicitly return
a `Future` via and `async` block to being a standard `async fn` returning
a `Result`.

Reviewed By: krallin

Differential Revision: D20582402

fbshipit-source-id: a98bb31075a41e8d6897b6893cd51ea0c5a94767
2020-03-24 08:28:09 -07:00
Steven Troxler
72ed701cc3 Asyncify all fns in aliasverify
Summary:
This diff asyncifies the APIs in `aliasverify` so that all
functions are either `async fns` or (in one case where there were
challenges dealing with lifetimes) functions returning new-style
`Future`.

This diff does not asyncify the old stream API uses inside of functions,
and the remaining issues (complicated lifetime handling and extra
`clone` calls) are all related to using the old stream api, but the
function signatures should all be forward-compatible with new futures.

Reviewed By: krallin

Differential Revision: D20577861

fbshipit-source-id: 79ca2ef8f91ee9a1be9e27d8bf6f083dbc0bb7cd
2020-03-24 08:28:09 -07:00
Steven Troxler
19e54c0256 Asyncify outermost logic in aliasverify
Summary:
This diff pushes `compat` down one layer in `aliasverify`, by:
 - Moving the future-based portion of main into a new acync fn
   `run_aliasverify`
 - Using new-style futures for `run_aliasverify`

Reviewed By: krallin

Differential Revision: D20572805

fbshipit-source-id: f0363793715944963a02380e861b851905975653
2020-03-24 08:28:08 -07:00
Steven Troxler
a7d0c782aa Asyncify stream operations in statistics_collector
Summary:
This diff moves all of the Stream operations in `statistics_collector` over
from the old futures api to the new futures-preview api, and in the process
removes all `clone` calls (except where we interface with lower-level
old-futures-based apis).

For reasons that aren't entirely clear to me, rust seems to be unable to
infer the lifetimes of some parameters in `update_statistics`, so I had to
anotate it explicitly.

Reviewed By: krallin

Differential Revision: D20583198

fbshipit-source-id: 1ea247f905649b05ebaabcf27d504d903d5e6365
2020-03-24 06:42:37 -07:00
Steven Troxler
ce27110dd5 Make all fns in statistics_collector use new-style futures
Summary:
Asyncify all remaining helper functions in `statistics_collector`, in the
sense that they all are now either `async fn` or return a new `Future`
explicitly.

The remaining work is to convert the guts of a couple of functions (particularly
`update_statistics` and `get_statistics_from_changeset` are still using
old-style futures. I haven't figured out how to convert from the old stream
api to the new one, so I didn't touch those spots.

Because of a lifetime issue resolving `ctx` and `repo` - which need
to be cloned before the async scope when we know the references are
still good - it was necessary to explicitly return a `NewFuture`
in `update_statistics`. The lifteime issues also forced me to do
two levels of clones of the parameters in this function, but at least the
signature is now forward-compatible.

Reviewed By: krallin

Differential Revision: D20569773

fbshipit-source-id: c2162a1fbde6d226028b3a66d2f6526c0a268232
2020-03-24 06:42:36 -07:00
Steven Troxler
4699cfb781 Push compat a level down in statistics_collector
Summary: This diff asyncifies the `generate_statistics_from_file` function.

Reviewed By: krallin

Differential Revision: D20546778

fbshipit-source-id: 721d3426768bd85462c210b145ed5168bff69bb1
2020-03-24 06:42:36 -07:00
svcscm
b72a14e9f9 Updating submodules
Summary:
GitHub commits:

d77be4d384
4897004040

Reviewed By: wittgenst

fbshipit-source-id: 560fda49db2612ae962fba317b130dc2b6720178
2020-03-24 06:42:36 -07:00
svcscm
27f81c87f3 Updating submodules
Summary:
GitHub commits:

0bd7af23b3
4d2f1db963
d300d10962
9eafc02456
a2f301b725
b0395f0b0e
dcb403515c
74a3c0ae53
60b734a667

Reviewed By: wittgenst

fbshipit-source-id: 6fb6754598b16939b1b8acd7ea7d022dd7ee473c
2020-03-23 20:16:45 -07:00
Chad Austin
68aa376681 switch getFileInformation to semifuture
Summary:
Instead of explicitly running results on the Thrift thread manager
executor, use the semifuture implementation of the Thrift method which
does the same thing automatically.

Reviewed By: fanzeyi

Differential Revision: D20481540

fbshipit-source-id: 5f23c0193514fce20d80e3292bfa7402f4448e38
2020-03-23 19:38:03 -07:00
Aida Getoeva
1306d4f4e7 scs: enable Scuba logging for perf counters
Summary:
Mononoke has performance counters that allow to log number of Blobstore gets and puts, Memcache hits and misses, etc. These metrics are very useful for debugging issues in production.

APIServer logs perf counters, but SCS apparently doesn't, this diff adds logging.

Reviewed By: mitrandir77

Differential Revision: D20598544

fbshipit-source-id: 5071434a90ae6bf356326a97f1d0593901912ef7
2020-03-23 19:01:00 -07:00
svcscm
6d34eefc03 Updating submodules
Summary:
GitHub commits:

ae6c3731d6
b2010747d4
803b23c7fb
e38fc32642
5e06047eb9
92d6948431
4ba527202c
088ce0c637
a0d0d5bd91

Reviewed By: wittgenst

fbshipit-source-id: 72193489b29bca8527709e93d74a3270137df28d
2020-03-23 19:01:00 -07:00
svcscm
024f81febd Updating submodules
Summary:
GitHub commits:

02fdc36707
68828e5fe9
16c7bc8a2a
05ddb755ce

Reviewed By: wittgenst

fbshipit-source-id: 20b50354256953df81284ef5852c45472d322c16
2020-03-23 17:34:50 -07:00
Zeyi (Rice) Fan
ae0e37455e use vendored Rust crates
Summary: Actually use vendored Rust crates when building with CMake. The `--offline` option make sure cargo do not go to the Internet for missing crates.

Reviewed By: simpkins

Differential Revision: D20542672

fbshipit-source-id: ab4af40150c6af8b531a75f503a4fa848b3914da
2020-03-23 17:24:35 -07:00
Steven Troxler
d90435ced9 Deprecate rust-crypto in eden/scm/lib/revisionstore
Summary:
Replace `rust-crypto` with `hex`, `sha-1`, `sha2`.
 - `crypto::sha1::Sha1` with `sha1::Sha1`
 - `crypto::sha2::Sha2` with `sha2::Sha2`
 - `crypto::digest::Digest` with `sha1::Digest` and `sha2::Digest`
 - `.result_str()` with `hex::encode` and `.result()`

Reviewed By: jsgf

Differential Revision: D20588313

fbshipit-source-id: 75c4342e8b6285f0f960f864c21457a1a0808f64
2020-03-23 16:38:07 -07:00
svcscm
69e00cd724 Updating submodules
Summary:
GitHub commits:

26399c4f4c
ab04797720

Reviewed By: wittgenst

fbshipit-source-id: 3d8ab21f84089c6f5885dcb80591050e12e857e8
2020-03-23 16:38:07 -07:00
svcscm
b118654980 Updating submodules
Summary:
GitHub commits:

0d3859605c
9813c524eb
84693531d4
9d60154152
a3b162690d
785f6d144b
617f479266
ae21ec84d1
619b7bc34e
49b77ad4c3
2108f1b791

Reviewed By: wittgenst

fbshipit-source-id: 09d4b01401ab8b9c65aeacce85d5b1fbc4f5d84d
2020-03-23 14:48:07 -07:00
Xavier Deguillard
730327c29e eden: commit the Rust ContentStore when unable to find a blob
Summary:
The markforrefresh only exist in the legacy Python contentstore, commiting the
current store will have the same effect for the Rust store.

Reviewed By: DurhamG

Differential Revision: D20562032

fbshipit-source-id: de12cfd65d992395c9b9894d1f05cf50d86b0191
2020-03-23 14:33:42 -07:00
Xavier Deguillard
674e9c7900 fsinfo: return an enum instead of a String
Summary:
In a strongly typed langage, using strings should be avoided whenever possible
as they do not provide the safety guarantees that types provide.

I took the liberty of removing all the filesystems that are not relevant for
Mercurial for simplification reasons. If needs arise, we can always add a new
FsType to the enum.

Reviewed By: DurhamG

Differential Revision: D20517138

fbshipit-source-id: 0a38b53c6a87f05f4b2d664038e10c4293de96ae
2020-03-23 14:29:10 -07:00
Jun Wu
beb3d8c692 fsmonitor: make race detector aware of the matcher
Summary:
This makes it so `hg status A` won't complain about race conditions about file
`B`. As we're here, the detector logic was also moved to the filesystem layer.

Reviewed By: DurhamG

Differential Revision: D20568151

fbshipit-source-id: 713e3775a14674fd170df391977d42d9dee0f718
2020-03-23 14:22:02 -07:00
svcscm
e069e5ed91 Updating submodules
Summary:
GitHub commits:

1c4cada9a6
8b577fe1da
c242b9c696
55fc4b3274
2ac99f48ec
3b6fd7d993
d33fabb7c4
5c6346c420
9af062b94e
c45985c40a
e76e824422
f324000119

Reviewed By: wittgenst

fbshipit-source-id: 6475a12fa12414a5ab795b337fa710f5be33ec1e
2020-03-23 12:55:47 -07:00
Adam Simpkins
d7a2142064 exclude eden/scm build artifacts from the getdeps path map
Summary:
If you have built the `eden/scm` subdirectory with `make local` in your
repository it will have left a bunch of build output artifacts in the source
tree.  Update the getdeps shipit path map for eden to explicitly exclude many
of these build artifacts.

In particular:
- Exclude `eden/scm/build/` since this directory can contains a lot of files.
- Exclude all `*.pyc` files since there may be a reasonable number of these.
- Exclude several Cargo-related files since these will cause problems when
  trying to build Rust code.

Reviewed By: chadaustin

Differential Revision: D20570720

fbshipit-source-id: a60dec4854ae470fdb58e9651fd8a3b910c76004
2020-03-23 11:29:09 -07:00
Steven Troxler
b6de099da8 Deprecate rust-crypto in zstore
Summary:
Replace `rust-crypto` with `sha-1`:
 - `crypto::digest::Digest` with `sha1::Digest`
 - `crypto::Sha1` with `sha1::Sha1`

The interface changes slightly - no need to pass a mutable byte array when
getting the result.

Reviewed By: jsgf

Differential Revision: D20587638

fbshipit-source-id: c6c737f3f8eba94b98c728e198eb4fac12c5c80b
2020-03-23 11:29:09 -07:00
Steven Troxler
71279b3916 Deprecate rust-crypto in manifest-tree
Summary:
Replace `rust-crypto` with `sha-1`:
 - `crypto::digest::Digest` with `sha1::Digest`
 - `crypto::sha1::Sha1` with `sha1::Sha1`

Reviewed By: jsgf

Differential Revision: D20587716

fbshipit-source-id: de801c20bffd356eb5b2205a63ec0218b3aca6c0
2020-03-23 11:15:58 -07:00
Steven Troxler
154c458285 Deprecate rust-crypto in eden/scm/lib/types
Summary:
Swap out `rust-crypto` for `sha-1`
 - `crypto::sha1::Sha1` is replaced by `sha1::Sha1`
 - `crypto::digest::Digest` is replaced by `digest::Digest`

Reviewed By: jsgf

Differential Revision: D20587685

fbshipit-source-id: 971fdaa8ce5b3e9e60db219131f6c36dcbc213d9
2020-03-23 11:15:57 -07:00
Steven Troxler
3534ca3bb8 Deprecate rust-crypto in edenfs-client
Summary:
Switched out the `sha` package for the `rust-crypto` package. The
apis aren't an exact match, so I had to insert a clone in place of
a modification to a mutable reference.

Reviewed By: jsgf

Differential Revision: D20585336

fbshipit-source-id: 22245157aea1115ae6f225b17b0346f0696653f7
2020-03-23 11:04:36 -07:00
Aida Getoeva
66f007f083 scs: separate scs-diff test
Summary: Move integration tests for `scsc diff` to the `test-scs-diff.t`.

Reviewed By: krallin

Differential Revision: D20557896

fbshipit-source-id: 201b6b5046babfef56db87c0cce70ab8cb6ae62c
2020-03-23 08:36:51 -07:00
Aida Getoeva
4819a08901 scs: separate log test
Summary:
`test-scs.t` is very big and takes too much time to run.
I'm moving integration tests for `scsc log` to the `test-scs-log.t` file.

Reviewed By: krallin

Differential Revision: D20537505

fbshipit-source-id: 8f4a06ad4b48f34eb131d095ec21bd2d08cfe9d9
2020-03-23 08:36:50 -07:00
Alex Hornby
24770ff84c mononoke: walker: add start_step to WalkVisitor
Summary: Add WalkVisitor::start_step entry point, so we have opportunity to take action before Nodes are loaded.

Reviewed By: krallin

Differential Revision: D20534842

fbshipit-source-id: 93c3e0974c99ee68b7c2e930f4b8fdea87b44bc3
2020-03-23 06:25:40 -07:00
svcscm
f2020e79c0 Updating submodules
Summary:
GitHub commits:

e2f47dc2e1

Reviewed By: wittgenst

fbshipit-source-id: df563aab980016c4a9cd72990b3018d5081af2f6
2020-03-23 05:38:42 -07:00
Alex Hornby
b3285fd963 mononoke: add sampling key to LoggingContainer
Summary:
Add sampling key to LoggingContainer so that we have a way to sample low level blobstore actions for a given high level blobrepo action with the

This is will be used to track the blobs loaded when walking a repo and associate them with paths.

Walker will assign a new sampling_key to each step, and the SamplingHandler attached to SamplingBlobstore will use it correlate the get() with the Node or Path we want to track accesses for. E.g. to build a corpus of blobs per path for compression analysis

Reviewed By: mitrandir77

Differential Revision: D20534844

fbshipit-source-id: 22662b66a57ad4fef044a1108648f4ad8f2dae78
2020-03-23 05:10:17 -07:00
Alex Hornby
72483f6fd8 mononoke: add a sampling blobstore
Summary:
Add a sampling blobstore for use by the walker.

Combined with the SamplingKey in next in stack it allows samplinglow level blobstore operations from hight level actions on things like BlobRepo.

Reviewed By: mitrandir77

Differential Revision: D20534843

fbshipit-source-id: 8c7378572a4f78534f66b09adfccf08b3aaa103d
2020-03-23 05:10:16 -07:00
Alex Hornby
da43e107f1 mononoke: walker: use derive_more to remove some boilerplate
Summary: use derive_more to remove some boilerplate for trivial Add/Div/Mul/Sum implementations.

Reviewed By: StanislavGlebik

Differential Revision: D20560288

fbshipit-source-id: ddab11134b133d8f29a2384e4858a35e9774e5cc
2020-03-23 03:07:19 -07:00
Stanislau Hlebik
d2412fbcfe mononoke: move StoreLoadable and add LodableError
Summary:
This is a small refactoring that does two things:
1) Move StoreLoadable into the Blobstore crate. This might be a bit
controversial since StoreLoadable doesn't have anything to do with blobstore.
But I put it there for a few reasons:
* In the next diffs I want to use StoreLoadable in mononoke_types. However I
can't create dependency from `mononoke_types` crate to `manifest` crate because
`manifest` depends on `mononoke_types`
* `manifest` crate doesn't look like a good place for this struct either
* I didn't find a better place for it - don't want to put it in crates like
`common`, and it creating a separate crate just for this trait looks like an
overkill.

2) Changes error type to LoadableError to match Loadable trait. This add one
FIXME for git tree which doesn't differentiate between these errors.

Reviewed By: krallin

Differential Revision: D20561442

fbshipit-source-id: a0dca0ff8daa5d7fa166f4527c2f7cc7f541a4c0
2020-03-23 00:43:44 -07:00
svcscm
42464ce4cb Updating submodules
Summary:
GitHub commits:

7c252a8f15
186d782f02
7bc1fe8379

Reviewed By: wittgenst

fbshipit-source-id: 0d82d7ebd452ad5953f90448daaba5aefc039484
2020-03-21 23:05:25 -07:00
svcscm
de25e38eb1 Updating submodules
Summary:
GitHub commits:

cf712dc9a8
cd84566130
56e0468711

Reviewed By: wittgenst

fbshipit-source-id: 2d0e40297c1804993c660c8c229574d5b732055a
2020-03-20 22:34:47 -07:00