Commit Graph

58380 Commits

Author SHA1 Message Date
Zeyi (Rice) Fan
b9332b3673 adding ObjectFetchContext to getattr
Summary: This diff teaches `getattr` to accept `ObjectFetchContext` and pass along.

Reviewed By: chadaustin

Differential Revision: D21780970

fbshipit-source-id: 0f4b1295753281420323a3b33ce76af0ff386587
2020-06-18 10:40:41 -07:00
Zeyi (Rice) Fan
ec622e8e1c start to accept ObjectFetchContext to InodeBase::stat()
Summary: This diff makes `InodeBase::stat()` to be able to accept `ObjectFetchContext` as a parameter.

Reviewed By: chadaustin

Differential Revision: D21780883

fbshipit-source-id: 9b1db2e2268cb98663bcf902ea61897da593ea05
2020-06-18 10:40:41 -07:00
Zeyi (Rice) Fan
7c483e1c02 use RequestData as ObjectFetchContext in read()
Summary: This diff starts to use `RequestData` as `ObjectFetchContext` in our `read()` methods. This ensures EdenFS could track backing store fetches happened in FUSE requests.

Reviewed By: chadaustin

Differential Revision: D21792503

fbshipit-source-id: 9509a1bc8f28100a0dfe196e312c4785c7842345
2020-06-18 10:40:41 -07:00
Zeyi (Rice) Fan
ae0d08f884 record backing store import in RequestData
Summary:
Previously we check if a request is a fuse request when we fetch anything from backing store, so we can collect number of fetches happened for each process in eden top.

This is creating a dependency from store to fuse, which is a little awkward. Instead, we could make `RequestData` a `ObjectFetchContext` and record the fetches when that happens.

Similarly in the future we should also have something equivalent in our Thrift layer.

Reviewed By: kmancini

Differential Revision: D21775919

fbshipit-source-id: 95056830ddbe7c999051c43e0d8eca9a67350904
2020-06-18 10:40:40 -07:00
Kostia Balytskyi
bac7962f6e backsyncer: rename incorrectly named local vars
Summary:
All of these are instances of `CommitSyncer`, named `commit_sync_config`. It
makes a reader think they may be instances of `CommitSyncConfig`.

Reviewed By: farnz

Differential Revision: D22113917

fbshipit-source-id: bb682b24d7cadf87ca7721f341dbc8231636c99a
2020-06-18 08:07:29 -07:00
svcscm
ebb21cdf09 Updating submodules
Summary:
GitHub commits:

3267a7ec1d
de2467b6a7

Reviewed By: zpao

fbshipit-source-id: 5b44662bf7a5c1265c9347095dda2cc035d3913a
2020-06-18 08:03:49 -07:00
Simon Farnsworth
5f2b7259cd Run hooks in the large repo as well as the small when pushredirection is in place
Summary: Megarepo is simplified if we can avoid copying hooks everywhere - run megarepo hooks as well as small repo hooks during pushredirection.

Reviewed By: StanislavGlebik

Differential Revision: D20652331

fbshipit-source-id: f42216797b9061db10b50c1440253de1f56d6b85
2020-06-18 07:33:46 -07:00
svcscm
fb450f118b Updating submodules
Summary:
GitHub commits:

9931684b87
40a5b0a0a2
516c18f001

Reviewed By: zpao

fbshipit-source-id: a8197ddc99b7585a8ca54b6bc833216cc12b282d
2020-06-18 03:34:50 -07:00
svcscm
78cff16752 Updating submodules
Summary:
GitHub commits:

7e9c160177

Reviewed By: zpao

fbshipit-source-id: c01b662026327c288cdaecf1ec8c49e32a89e039
2020-06-18 03:34:50 -07:00
svcscm
66c7dc6136 Updating submodules
Summary:
GitHub commits:

62808c1b17
51b349de4f
e28861851c
00ce330bce
a21f1c2f68

Reviewed By: zpao

fbshipit-source-id: 8d517f6750b7b84dd3baf57b484a9d0b503debb7
2020-06-17 20:06:32 -07:00
Jeremy Fitzhardinge
35b292ce9d eden: manual dependency fixes
Summary:
Tooling can't handle named_deps yet, but it can warn about them

P133451794

Reviewed By: StanislavGlebik

Differential Revision: D22083499

fbshipit-source-id: 46de533c19b13b2469e912165c1577ddb63d15cd
2020-06-17 17:55:04 -07:00
Jeremy Fitzhardinge
1b4edb5567 eden: remove unused Rust dependencies
Summary:
Remove unused dependencies for Rust targets.

This failed to remove the dependencies in eden/scm/edenscmnative/bindings
because of the extra macro layer.

Manual edits (named_deps) and misc output in P133451794

Reviewed By: dtolnay

Differential Revision: D22083498

fbshipit-source-id: 170bbaf3c6d767e52e86152d0f34bf6daa198283
2020-06-17 17:55:03 -07:00
svcscm
b84b09eee9 Updating submodules
Summary:
GitHub commits:

e6a3132088
681a601e53
dab1efec6f
29adc3046c
fb133b3e1d
766cf0ff53
223b57eeb8
b260f31882
62d294f62a
346f7a7c78
70aa11ac13
e25b8c0f5e
8ad8212da7

Reviewed By: zpao

fbshipit-source-id: 84180e0e01b584368739a7e0171c25c478e6254a
2020-06-17 17:55:03 -07:00
svcscm
d374ea5098 Updating submodules
Summary:
GitHub commits:

3fb35654f6
1de7bc1514
6d044e8a40
f6d0e2207c
e86cb7e32d
24ed129271
db84ba72b9
b25e6fd829
5e0b5a0c50
b7c3d0d430
d498c26d85
a18be57c07

Reviewed By: zpao

fbshipit-source-id: 622278bda3a34db9587ffc636f4bd6feefb4d0ab
2020-06-17 08:33:15 -07:00
Lukas Piatkowski
60419d261b cargo_from_buck: add the patch section to Cargo workspace and allow workspace appending to existing manifest
Summary:
Two changes here:
1. The `[patch.crates-io]` section of `third-party/rust/Cargo.toml` is being now copied over to workspaces generated by autocargo for OSS and in the runtime generated Cargo.toml file for cargo-fbcode builds. Without that some projects could be buildable in Buck internally, but not externally on GitHub due to missing patches.
2. If a `[workspace]` Cargo.toml file is being generated and there is already a generated Cargo.toml file in the same directory then instead of overriding that file the `[workspace]` (and `[patch]`) sections are appended to that Cargo.toml file.

Reviewed By: farnz

Differential Revision: D22023144

fbshipit-source-id: dec54491c36c2ee0ab29eefb722b3eceaef6ffe1
2020-06-17 06:27:39 -07:00
Kostia Balytskyi
de7fd72ed3 push_redirector: instantiate at request start
Summary:
The goal of the stack is to support hot reloading of `CommitSyncConfig`s everywhere: in `push_redirector`, `backsyncer`, `x-repo sync job` and so forth.

This diff in particular is a refactoring of how we instantiate the `PushRedirector` struct for the `unbundle` flow. Previously the struct would be instantiated when `RepoHandler` struct was built and would later be reused by `RepoClient`. Now we want to instantiate `PushRedirector` before we start processing the `unbundle` request, so that we can request the newest `CommitSyncConfig`. Note that this diff does not introduce the hot reload itself, it just lays the groundwork: instantiation of `PushRedirector` at request start.

To achieve this goal, `RepoClient` now contains a somewhat modified `PushRedirectorArgs` struct, whose goal is to own the unchanging stuff, needed to create a full `PushRedirector`.

Here are a few explicit non-goals for this hot reloading:
- the overall decision whether the repo is part of any `CommitSyncConfig` or not is still made at `RepoHandler` creation time. What this means is that if `CommitSyncConfig` is changed to have another small repo and Mononoke servers happens to know about that repo, it would not automatically pick up the fact that the repo should be a part of `CommitSyncConfig`
- same for removal (stopping push redirector is already possible via a different hot-reloaded config)
- changing anything about a large/small relationship is likely to be very complicated under the best circumstances of everything being down, let alone during a hot reload. This means that target repo cannot be changed via this mechanizm.

Essentially, the goal is only to be able to do a live change of how paths change between repos.

Reviewed By: StanislavGlebik

Differential Revision: D21904799

fbshipit-source-id: e40e6a9c39f4f03a436bd974f3cba26c690c5f27
2020-06-17 04:46:23 -07:00
Alex Hornby
50ed8dd53f mononoke: add ZstdFromDictValue decoding to packblob
Summary: Add ZstdFromDictValue decoding to packblob

Reviewed By: farnz

Differential Revision: D22038110

fbshipit-source-id: 1f3a6c1c511b10f97d0a68885352d6d5c4725ceb
2020-06-17 03:49:56 -07:00
Viet Hung Nguyen
afb08f814a mononoke/repo_import: created initial main and target files
Summary: Added basic main and target files for the repo import tool

Reviewed By: StanislavGlebik

Differential Revision: D22067642

fbshipit-source-id: 5ed97e3f2446c86314918f57103c2ecb911e30b0
2020-06-17 03:22:16 -07:00
Alex Hornby
9c53e07e46 mononoke: add optional compress to packblob put
Summary:
Add optional compress on put controlled by a command line option.

Other than costing some CPU time, this may be a good option when populating repos from existing uncompressed stores to new stores.

Reviewed By: farnz

Differential Revision: D22037756

fbshipit-source-id: e75190ddf9cfd4ed3ea9a18a0ec6d9342a90707b
2020-06-17 02:35:04 -07:00
Alex Hornby
1a3968376c mononoke: add zstd decoding to packblob
Summary: Add zstd decoding support to packblob so that if store contains individually zstd compressed blobs we can load them on get()

Reviewed By: farnz

Differential Revision: D22037755

fbshipit-source-id: 41d85be6fcccf14fb198f6ea33a7ca26c4527a46
2020-06-17 02:35:03 -07:00
Alex Hornby
18586c5ece mononoke: add repo prefix detection and removal for embedded keys
Summary:
Add a regex for repo prefix detection, and use it in prefixblob for removal of repo prefix from blob-embedded keys.

This is important to keep blobs copyable between repos, and to allow dedupe between same blob in two repos.

I looked at alternate approaches of passing down the prefix from PrefixBlob::new(),  but that was fragile and didn't cover the use cases from things like blobstore_healer where no prefixblob is configured at all but packblob will be in the blobstore stack.  Using a pattern is the only real option in such "all repo" cases.

The aim of binding the pattern and its tests closely to the prefix generation is to make it hard for someone to get them out of sync, and provide a clear local test failure if they do.

Reviewed By: farnz

Differential Revision: D22034638

fbshipit-source-id: 95a1c2e1ef81432cba606c22afa16b026f59fd5f
2020-06-17 02:35:03 -07:00
Alex Hornby
55db650e37 mononoke: add pack handling to packblob
Summary:
Add pack and unpack logic to packblob.

Loading a packed form is possible from a regular get(), as the store may contain packed data.

Storing a packed form is only possible from a new put_packed() method,  intended for use from the packer (and tests).

NB As noted in the TODO in get, this does not yet handle prefix removal on get,  will address that in a separate diff.

Reviewed By: StanislavGlebik

Differential Revision: D21980498

fbshipit-source-id: f534b0e754aa29c42bf00bb7e764f93f1446c14c
2020-06-17 02:35:03 -07:00
Alex Hornby
b21dca37b0 mononoke: add blobstore link trait
Summary: Add blobstore link trait so we can use hardlink style links in fileblob and memblob for testing and later sqlblob et al for prod.

Reviewed By: StanislavGlebik

Differential Revision: D21935647

fbshipit-source-id: f76eaca26b6b226c77d6e39e9c64e02b4145b614
2020-06-17 02:35:03 -07:00
svcscm
623bd3aa17 Updating submodules
Summary:
GitHub commits:

f0471228b8
5edd037348

Reviewed By: zpao

fbshipit-source-id: de988de589c3a2460bbe0310f578bc80c2a2a7b8
2020-06-17 02:35:03 -07:00
svcscm
6585af2e3e Updating submodules
Summary:
GitHub commits:

61a434e95d
fdbe96aed6
742b452863
278902038a

Reviewed By: zpao

fbshipit-source-id: 603f1dfffdb7e4b16d7dfcc25a63dd5efff3ae29
2020-06-16 22:55:11 -07:00
Arun Kulshreshtha
b0e795886f edenapi_server: fix capitalization in serialization errors
Summary: Fix the capitalization in the error message to match the other variants.

Reviewed By: singhsrb

Differential Revision: D22078125

fbshipit-source-id: 4a1de0111fa4dceea2d401c47ef145669a3cc6f5
2020-06-16 20:37:08 -07:00
svcscm
52e516864d Updating submodules
Summary:
GitHub commits:

b77dcf05d5
47330750f3
b488ad5cdd

Reviewed By: zpao

fbshipit-source-id: 73ee68438d71527c3ec89ff113d7d09721c09f92
2020-06-16 20:37:08 -07:00
svcscm
bed9bf873d Updating submodules
Summary:
GitHub commits:

666f371b88
f8b5047a92
4a2b3b5c9d
188022b1b0
b7bab48099
c57a61b3c9
5841e83883
32a1dd2b11
cec441bfd6
aa6ae00624
e3a80c2a12

Reviewed By: zpao

fbshipit-source-id: 39adbcd880ea3d3859096a47fff9dd2438b4e9b6
2020-06-16 17:17:45 -07:00
Stanislau Hlebik
97e003819a mononoke: use async stream get_file_history_using_prefetched
Summary: asyncify get_file_history_using_prefetched. Initially I was planning to change this function in the next diff, but then changed my mind. However asyncifying this function won't hurt to land.

Reviewed By: krallin

Differential Revision: D21881121

fbshipit-source-id: 0b2e92ae015b72e1f4578153c56708faabc4bf13
2020-06-16 14:36:14 -07:00
svcscm
76dde2e627 Updating submodules
Summary:
GitHub commits:

b6e5b6473c
56bdd8b3aa
721ac3e283
a455549a4d
09754aa4d6
6530836c78

Reviewed By: zpao

fbshipit-source-id: dfbdd7c1746561aaa19f7d11c188597f24d6321e
2020-06-16 12:48:45 -07:00
Mateusz Kwapich
406bf6e353 migrate reachabilityindex::common module to async/await syntax
Summary: this is the last diff to complete the `reachabilityindex` module migration

Reviewed By: farnz

Differential Revision: D22049853

fbshipit-source-id: d8510f2d1b1c12a1ba903c2afda37096aadd8347
2020-06-16 11:10:21 -07:00
Mark Thomas
080f455000 mutationstore: insert mutation info in a stable order
Summary:
When inserting multiple rows using `INSERT IGNORE`, it's possible to hit
deadlocks if two competing transactions insert the same rows in a different
order.

This can be triggered in the mutation store if two clients are pushing
overlapping sets of commits, and the arbitrary changeset order from the
`HashSet` gives the commits in a different order.  For example the first
transaction might be inserting "A, B, C", be holding the lock on row A, and be
waiting for the lock on row C, meanwhile another transaction is inserting "C,
D, A", holding the lock on row C, and waiting for the lock on row A.

To avoid these deadlocks, always insert the mutation changesets in a stable
order (sorted by changeset hash or successor hash).

Reviewed By: krallin

Differential Revision: D22067338

fbshipit-source-id: aa54c8a9c0cac4e4ae35855b44e759f8b6cb4f59
2020-06-16 10:33:41 -07:00
Mark Thomas
d9702a314a sampling: log repo root and repo shared root
Summary:
Add logging of the repo root and repo shared root to the sampling extension.

Reduce the number of different strings that are logged by replacing any path
component that equals the user's username (e.g. their home directory) with
`$USER`.

Reviewed By: farnz

Differential Revision: D22066053

fbshipit-source-id: 39221e5182b3d4df51afa386497003e637a50b13
2020-06-16 10:25:03 -07:00
svcscm
318b6a9a64 Updating submodules
Summary:
GitHub commits:

d11ad471ff
5baef31d02
0e92511dc6

Reviewed By: zpao

fbshipit-source-id: de83b1e25d087d73ccfecd4ff1bb080cc9280b6a
2020-06-16 05:35:40 -07:00
Alex Hornby
0134614228 mononoke: async blobstore-test
Summary:
async the blobstore test functions, in preparation for adding test coverage for BlobstoreWithLink::link

The boxable test was duplicating the simple roundtrip test which seemed unnecessary, now it just checks that we can Box the blobstore type.

Reviewed By: krallin

Differential Revision: D21974471

fbshipit-source-id: a3cd71a7503a3a670b3c6223812a2e870a20a16e
2020-06-16 04:11:44 -07:00
Alex Hornby
95db00c3b8 mononoke: update memblob imports to futures_old
Summary: update memblob imports to futures_old in preparation for using new futures to implement BlobstoreWithLink

Reviewed By: krallin

Differential Revision: D21973642

fbshipit-source-id: dea4a686db41a0d618395c4dc411603f922a9e22
2020-06-16 04:11:44 -07:00
Alex Hornby
3461170052 mononoke: update fileblob imports to futures_old
Summary: Update imports in preparation for using new futures for the BlobstoreWithLink mixin trait

Reviewed By: StanislavGlebik

Differential Revision: D21973587

fbshipit-source-id: 094aa82abc21848d43f50d6d169087e19339ba04
2020-06-16 04:11:44 -07:00
Alex Hornby
2b115684af mononoke: switch blobstore imports to use futures_old naming
Summary: Switch blobstore imports to use futures_old naming in preparation for using new futures in BlobstoreWithLink (and later BlobstoreWithEnumeration) traits.

Reviewed By: krallin

Differential Revision: D21972842

fbshipit-source-id: 6022c98e7b7254f7c7beb46dc1c7f83609810853
2020-06-16 04:11:44 -07:00
Alex Hornby
6658b17fb6 mononoke: add packblob to blobstore_factory
Summary: mononoke: add packblob to blobstore_factory

Reviewed By: farnz

Differential Revision: D21924406

fbshipit-source-id: d42702b11bdc0b187467869a7959f68022c60ab2
2020-06-16 04:11:43 -07:00
Alex Hornby
8aafcf3524 mononoke: add basic packblob blobstore
Summary: Add basic packblob store which wraps blobs in the thrift StorageEnvelope type on put() and unwraps them on get()

Reviewed By: farnz

Differential Revision: D21924405

fbshipit-source-id: 81eccf5da6b5b50bdb9aae13622301a20dca0eac
2020-06-16 04:11:43 -07:00
Alex Hornby
f581b973f0 mononoke: packblob: thrift definitions and README
Summary:
Thift definitions for a new blobstore layer known as packblob, which is an enabling part of compression at the mononoke blobstore layer.  Its storage formats will support raw data, individual blob compression and blob delta compression.

The included README.md has more detail on the expected use of these types.

Reviewed By: farnz

Differential Revision: D21761723

fbshipit-source-id: a277800f4b4aed5972c4a5bb277e984ff12660f8
2020-06-16 04:11:43 -07:00
Stanislau Hlebik
e7e21f9c30 mononoke: migrate megarepolib to new futures
Summary:
I'm going to change it in the next diffs, so let's migrate them to new futures
first.

Reviewed By: krallin

Differential Revision: D22065216

fbshipit-source-id: b06fcac518d684f40b1d19fcef9118ca51236873
2020-06-16 03:32:50 -07:00
Simon Farnsworth
262ce6f362 Use per-shard MyAdmin measured delays
Summary: Without this, the most lagged shard will slow down all shards; with this, a single lagging shard doesn't slow down other shards.

Reviewed By: ahornby

Differential Revision: D22018264

fbshipit-source-id: c23f25ea1d0b0b6891d2a6f76dfed467101d2f4d
2020-06-16 02:56:48 -07:00
Simon Farnsworth
8a01732caa Move delay into the stores
Summary: I'll want the delay operation to respect shard_id - move it into the stores. While here, do some refactoring that will reduce the size of the next diff.

Reviewed By: ahornby

Differential Revision: D22018317

fbshipit-source-id: d2333dfc6749b2a13bc8a67bfa953ed25cedf847
2020-06-16 02:56:48 -07:00
svcscm
476f569150 Updating submodules
Summary:
GitHub commits:

7f2aa921d3
67be506a22
9975723ae6
792d3247e1
3e1c1afd22
140c160ccf
8814ba45f6
fef00d2f48
f91a8a06b0
b19dd26327
383ea2e754

Reviewed By: zpao

fbshipit-source-id: 2385b7b9e2e7a9236613969a76f236661b5f8da9
2020-06-15 21:53:23 -07:00
Chad Austin
c13386ead4 fix test
Summary:
test_no_units_are_active was failing on CentOS 8. Presumably systemd
has some new default services. I believe genevievehelsel is planning on
replacing all of this code, so, rather than understand the failure,
just ignore the additional service names.

Reviewed By: genevievehelsel

Differential Revision: D22055992

fbshipit-source-id: b6f313350d0e1b107fe6ea3d7ed7f5b4eb025ef3
2020-06-15 18:37:01 -07:00
Xavier Deguillard
adcd787f1b remotefilelog: do not import the builtins module
Summary:
From a simple `hg trace log -r .`, it appears that importing the module takes
16ms, which dominates the time it takes to load the treemanifest extension.
Since the module isn't necessary, don't import it.

Reviewed By: farnz

Differential Revision: D22048075

fbshipit-source-id: ccaf2d53eb006faa36d97df452b0db10f4983c23
2020-06-15 17:30:44 -07:00
Jeremy Fitzhardinge
c530d32056 rust: clean up some warnings
Summary: Prep for 1.44 but also general cleanups.

Reviewed By: dtolnay

Differential Revision: D22024428

fbshipit-source-id: 8e1d39a1e78289129b38554674d3dbf80681f4c3
2020-06-15 16:50:40 -07:00
Chad Austin
46a89778ea enable asynchronous integration tests
Summary:
Python 3.8 provides the (poorly named)
unittest.IsolatedAsyncioTestCase base class that gives each test an
asyncio event loop and runs it. This allows us to write async
integration tests, required to use modern Thrift Python.

Reviewed By: genevievehelsel

Differential Revision: D21955584

fbshipit-source-id: 8366dc7c72b31e1667e72fe1e359587b74e2c614
2020-06-15 15:53:50 -07:00
svcscm
6193eeb1f3 Updating submodules
Summary:
GitHub commits:

f5c9b4a2bb
aace4022cf
0c4401f0d0
8d4e8eded7
5e3bff33cf
fdff56cdcc
38f55c540f
9bfd46d0d8
55e75f5c23
98b6d677ae
ae09edbef5
53e72c8e7e
45c7608434
55c4df9694
4ffc36b6de

Reviewed By: zpao

fbshipit-source-id: 7c18201fd4b799231afdaac635ce47c2c7073836
2020-06-15 15:42:56 -07:00