Commit Graph

55571 Commits

Author SHA1 Message Date
svcscm
f49cdeffe3 Updating submodules
Summary:
GitHub commits:

4bc5213b66
9ae570bb89
b2bc1da561
dcde8696bd

Reviewed By: zpao

fbshipit-source-id: c5ca30dab73f80cd13f5a5bf6e3867083b2512ac
2020-02-10 15:07:25 -08:00
svcscm
3a2d845970 Updating submodules
Summary:
GitHub commits:

791fcef36b
debc4ef18b
967c3b8c5f
822b3eacbf

Reviewed By: zpao

fbshipit-source-id: 1d8c0a471f3820e687ce0be5eed641f0260143ad
2020-02-10 15:07:25 -08:00
svcscm
abcd3c053d Updating submodules
Summary:
GitHub commits:

3acab0697d
416bc6ef61

Reviewed By: zpao

fbshipit-source-id: 3ca37693abbfd017862e8822b7fb7ea442895efc
2020-02-10 10:18:42 -08:00
Wez Furlong
0c4d6d82f2 eden: apfs helper: make chown a bit nicer
Summary:
I think I might want to call this from more than one place in
a later diff, so extract it into a helper function.

Reviewed By: chadaustin

Differential Revision: D19770166

fbshipit-source-id: e044003736c6ba21984a9129da1df50ce92b2f35
2020-02-10 08:28:50 -08:00
Wez Furlong
28f7b4a0b0 eden: show desktop notification for blob/tree fetch errors
Summary:
This commit causes a desktop notification to be shown if we generate
EIO or ETIMEDOUT responses via fuse; the prompt is intended to make it obvious
to the user that they need to connect to the VPN.

The commit by itself doesn't show a notification, it allows configuring a
command that can be run to do something to show a notification.

The test plan includes one such configuration for our corp environment.

* It doesn't trigger for thrift-originated downloads (eg: prefetch), only for
  VFS operations through FUSE.
* Ideally we'd know exactly when we have a network related error in the store
  code and use that to trigger the notification.  However, we have a rather
  convoluted set of importers and fallbacks today, one of which is interpreting
  a generic response returned from a pipe, so it is not especially clear
  exactly where we should locate the logic

Reviewed By: chadaustin

Differential Revision: D17513364

fbshipit-source-id: 45134f3672679cb5580cb0c1bc12a0d6e38525ca
2020-02-10 08:28:49 -08:00
Mark Thomas
8869eafe44 scs_server: include error source chain on internal errors
Summary:
Include the full error source chain on any internal errors.  This will improve
debugability when internal errors are encountered, as the outermost context
might not be enough to describe the origin of the error.

Detect when backtraces are disabled, and only include them on the error if a backtrace was captured.

Reviewed By: StanislavGlebik

Differential Revision: D19813785

fbshipit-source-id: c28ffc0c44050a82cb7050afa57e976f37962432
2020-02-10 07:26:03 -08:00
Alex Hornby
c88ad00fcf mononoke: create bounded_traversal crate with bounded_traversal_stream
Summary: create a bounded traversal crate with the 0.1 version of bounded_traversal_stream functionality,  prior to updating to futures 0.3

Reviewed By: farnz

Differential Revision: D19804873

fbshipit-source-id: e98e00111fee5b1a9fcfc20bb054eeae1263fb26
2020-02-10 06:02:42 -08:00
Alex Hornby
dba8424409 mononoke: walker: replace use of spawn_future with tokio 0.2 join handle
Summary: replace use of spawn_future with tokio 0.2 join handle

Reviewed By: krallin

Differential Revision: D19770171

fbshipit-source-id: e0b7bf3da58896b223149b339a72bfec997215ee
2020-02-10 06:02:41 -08:00
Alex Hornby
0105ad492b mononoke: walker: update the step methods to new futures
Summary:
Update the walker step methods to use new futures, and combine them with async fn

Later in stack planning to:
  * remove use of spawn_future and replace it with the tokio 0.2 join handles
  * port bounded_traversal_stream to new futures so all these 0.3 futures don't immediated get compat'd back to 0.1

Reviewed By: farnz

Differential Revision: D19767902

fbshipit-source-id: 10fd6236a064efbb7d0815fadbdd32036bcafead
2020-02-10 06:02:41 -08:00
Harvey Hunt
3d6d9754b5 mononoke: Add original_timestamp column to blobstore_sync_queue sqlite schema
Summary:
D19767626 added an original_timestamp column to the
blobstore_sync_queue. Update the sqlite schema to keep it in sync.

Reviewed By: krallin

Differential Revision: D19787488

fbshipit-source-id: ad576e2ec99349953e2ab69e3defb73d1ff556c0
2020-02-10 04:37:40 -08:00
Harvey Hunt
78c44c5ec2 mononoke: Populate multiplex_id when writing blobs and update the healer to read them
Summary:
Modify the multiplexed blobstore implementation so that the
multiplex_id is written to the healer queue after a put. Further, update the
blobstore healer to only look at entries with the same multiplex ID as it's
configured to run with.

Reviewed By: ahornby

Differential Revision: D19770057

fbshipit-source-id: 41db19f0b0f84c048d49ab9e6258cccc89cf4195
2020-02-10 04:37:40 -08:00
Simon Farnsworth
3a2ae2f772 Move task spawning to last minute to reduce flakiness
Summary:
This test deliberately races itself. Unfortunately, tokio's scheduler is sufficiently quick that if we spawn all the futures as they're created, they sometimes don't race each other.

Fix this by spawning in the join line instead.

Reviewed By: ahornby

Differential Revision: D19812651

fbshipit-source-id: 86685bbb71c451e9c2a96100c83ddff28d0718dd
2020-02-10 03:42:30 -08:00
Alex Hornby
c147600793 mononoke: walker: fix performance regression loading file data
Summary: Fix performance regression in loading file data.

Reviewed By: farnz

Differential Revision: D19808562

fbshipit-source-id: 098fbd30dcd962b951e3ec040a799b4883ec421e
2020-02-10 01:49:59 -08:00
Stanislau Hlebik
2b7e7e5676 mononoke: log if derived data is not enabled
Summary:
Before we start blocking generation of derived data let's start with logging if
derived data is not specified.

Reviewed By: farnz

Differential Revision: D19791523

fbshipit-source-id: 15bed8463f8a021de76a2878f06ec95d9fef877f
2020-02-10 01:44:09 -08:00
Stanislau Hlebik
8abe1af621 mononoke: add DerivedDataConfig
Summary:
See D19787960 for more details why we need to do it.
This diff just adds a struct in BlobRepo

Reviewed By: HarveyHunt

Differential Revision: D19788395

fbshipit-source-id: d609638432db3061f17aaa6272315f0c2efe9328
2020-02-10 01:44:09 -08:00
Thomas Orozco
46037e13d0 mononoke: update test-lfs-server-proxy-skip-upstream.t to be more deterministic
Summary:
Looks like most of our tests got slower recently, and this particular test
started failing as a result since it's sensitive to timing. Unlike when this
test was written, we can now get a little more info from Mononoke LFS by
looking at Scuba logs, to know if we went to upstream or not. So, let's do
that.

Reviewed By: HarveyHunt

Differential Revision: D19790000

fbshipit-source-id: 5617b088595c911018166d2c13eb43dc6adca60b
2020-02-10 01:40:41 -08:00
svcscm
3bd05c344c Updating submodules
Summary:
GitHub commits:

88cc7c9355

Reviewed By: yns88

fbshipit-source-id: 0143c3f0adcbdfae64c24d1f3aade17bc3f1a114
2020-02-10 01:40:40 -08:00
svcscm
2fc24f93f7 Updating submodules
Summary:
GitHub commits:

09446426df

Reviewed By: yns88

fbshipit-source-id: b4dbc20cba139a757e95aaee04784339e3d69c73
2020-02-09 23:52:34 -08:00
svcscm
583fe39ca8 Updating submodules
Summary:
GitHub commits:

76b030e84b
987dfdc1b8

Reviewed By: yns88

fbshipit-source-id: ce1f5d186d1b13169057bd123e6105e246c96aed
2020-02-09 23:52:33 -08:00
svcscm
96f358ac3c Updating submodules
Summary:
GitHub commits:

d6785c6fa1
9bfeb6a951
b25d19c478

Reviewed By: yns88

fbshipit-source-id: 72505634bd114aa8b39a54e653a15278672b7110
2020-02-09 15:55:38 -08:00
svcscm
3a2b035fdb Updating submodules
Summary:
GitHub commits:

c809df6536
c63feee30b
a67ff280c9

Reviewed By: yns88

fbshipit-source-id: c3c05e026ff726799ebe518e6ba37ca5a15f7eae
2020-02-08 19:23:16 -08:00
svcscm
9ab828bfdb Updating submodules
Summary:
GitHub commits:

2703e3a0a2
ec5e903333
84b41a6969

Reviewed By: yns88

fbshipit-source-id: 9cb62264ca38813e1a0565af30f28b1b9c775e54
2020-02-07 19:01:45 -08:00
generatedunixname89002005307016
1143bd18c2 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D19792646

fbshipit-source-id: f2ba11c409730a19139ac897af93f3df7ce4c882
2020-02-07 17:43:04 -08:00
Arun Kulshreshtha
ea60863fca edenapi_server: shut down gracefully
Summary: Make the EdenAPI server report that it is exiting when asked to shut down. This ensures that Proxygen will stop sending traffic to servers that are about to be shut down by Tupperware. This diff is basically the same as krallin's diff D17626009 for the LFS server.

Reviewed By: quark-zju

Differential Revision: D19782432

fbshipit-source-id: 41b9e6761145402e7dcf18c53a2b33799588594c
2020-02-07 16:41:14 -08:00
Arun Kulshreshtha
d7292d5ede edenapi_server: use Mononoke API
Summary: This diff sets up the Mononoke API (from the `mononoke_api` crate) in the EdenAPI server, and makes it available to route handlers by adding it to a new `EdenApiContext` struct that is maintained as part of the server's global state. The server's route handlers should use the Mononoke API for accessing source control data, and any new source control business logic should be incorporated into that crate rather than being part of the EdenAPI server itself.

Reviewed By: xavierd

Differential Revision: D19778441

fbshipit-source-id: bc2efb82e0276d75c49980c52fa0d3017a4ce2f1
2020-02-07 16:41:14 -08:00
svcscm
631cec6fd9 Updating submodules
Summary:
GitHub commits:

8e52a6669f
0eb09b752d
4e457278fa
9e82512508
149b600870
1a8dfecc83
8e3e8ad08d

Reviewed By: yns88

fbshipit-source-id: bbfd078171ac18a4885479bdf5671f5183af8baf
2020-02-07 16:41:13 -08:00
svcscm
c32bef6c61 Updating submodules
Summary:
GitHub commits:

307e46ac84
a14c8b756b
8cbad71f1e
b42fa1497f

Reviewed By: yns88

fbshipit-source-id: 3655a7444237590f06b083658b8ef3e1361801c0
2020-02-07 15:11:57 -08:00
Jun Wu
abb8ccb346 minibytes: add serde support
Summary:
See also https://github.com/serde-rs/bytes/.

This will be used in the `dag` crate.

Reviewed By: DurhamG

Differential Revision: D19770858

fbshipit-source-id: 2a870a564e0ceecdc7a4667853b2b2a5ea4ce6e3
2020-02-07 14:21:39 -08:00
Jun Wu
8029cd3878 minibytes: port benchmark from tokio/bytes
Summary:
Performance looks okay comparing with tokio/bytes v0.5.4:

minibytes:

  test clone_arc_vec        ... bench:      16,542 ns/iter (+/- 1,524)
  test clone_shared         ... bench:      16,211 ns/iter (+/- 596)
  test clone_static         ... bench:       1,437 ns/iter (+/- 502)
  test deref_shared         ... bench:         367 ns/iter (+/- 101)
  test deref_static         ... bench:         366 ns/iter (+/- 1)
  test deref_unique         ... bench:         367 ns/iter (+/- 4)
  test from_long_slicd      ... bench:          91 ns/iter (+/- 18) = 1406 MB/s
  test slice_empty          ... bench:      10,382 ns/iter (+/- 104)
  test slice_short_from_arc ... bench:      23,823 ns/iter (+/- 1,411)

tokio/bytes:

  test clone_arc_vec        ... bench:      16,213 ns/iter (+/- 1,864)
  test clone_shared         ... bench:      18,685 ns/iter (+/- 634)
  test clone_static         ... bench:       3,983 ns/iter (+/- 163)
  test deref_shared         ... bench:         366 ns/iter (+/- 26)
  test deref_static         ... bench:         373 ns/iter (+/- 36)
  test deref_unique         ... bench:         391 ns/iter (+/- 33)
  test from_long_slice      ... bench:          67 ns/iter (+/- 7) = 1910 MB/s
  test slice_empty          ... bench:      15,149 ns/iter (+/- 1,708)
  test slice_short_from_arc ... bench:      36,541 ns/iter (+/- 3,485)

clone_static is faster because minibytes don't call into vtable's clone.
from_long_slice is slower because minibytes uses Arc unconditionally while bytes
can avoid Arc overhead if refcount is 1.

Reviewed By: DurhamG

Differential Revision: D19770857

fbshipit-source-id: 5bafcc57a38c68baccfcafd3906f1a47b2bf4530
2020-02-07 14:21:39 -08:00
Jun Wu
108f1c947a minibytes: minimalist zero-copy Bytes with mmap support
Summary:
This crate provides the core features of the commonly known `Bytes` crate:
zero-copy slicing and cloning, while also supports mmap-backed buffers.

The main motivation is to replace `Mmap` in `indexedlog`. That has multiple
benefits:
- Handles 0-sized mmap more cleanly.
- Handles clones more cleanly.
- Gain the flexibility to zero-copy data without lifetime / reference.
- Gain the flexibility to switch to non-mmap data.

The `bytes::Bytes` crate does not yet support mmap buffers as of its latest
release (0.5.4).

Implementation wise, `minibytes::Bytes` uses `Option<Arc<dyn Trait>>` for the
"trait object". This makes implementing the mmap storage just one line.
`bytes 0.5.4` re-invents the "trait object" manually using unsafe code. It requires
about 50 lines to implement the mmap storage (in D19756122).

Reviewed By: xavierd

Differential Revision: D19770856

fbshipit-source-id: 8cfa7052a18ac2e0cd6348b77d5e2a4acc61195c
2020-02-07 14:21:38 -08:00
Durham Goode
8902d630b2 tracing: upload stack traces and link it to our main data
Summary:
Our main data table has no information about the actual failure. Let's
upload a stack trace to blob storage and link to it from the main table.

Reviewed By: quark-zju

Differential Revision: D19780653

fbshipit-source-id: acaab29a47d32dd6ab81fed0c3ae50c8eb44b760
2020-02-07 14:04:38 -08:00
Durham Goode
6e338a97d4 remotefilelog: recreate cache process after fork
Summary:
If the main process forks, the connection to the cache client is likely
unusable. Let's drop that connection and we can recreate it later if needed.

Reviewed By: quark-zju

Differential Revision: D19796387

fbshipit-source-id: 59b0d3db9655d2233b55effcdf18cbd74a3f5edd
2020-02-07 13:20:30 -08:00
Xavier Deguillard
87bd36fb46 eden: use third-party/rust for the vendored crates
Summary: All the crates are present in third-party/rust, let's use it in the OSS build instead of fetching a tarball of all the crates.

Reviewed By: fanzeyi

Differential Revision: D19770783

fbshipit-source-id: f0d74bb0807be207d599d4868f907d38099c7f5b
2020-02-07 13:10:52 -08:00
svcscm
f82802673f Updating submodules
Summary:
GitHub commits:

4ccb4c1e70
6f1a96a41e
f361cedf06
3c4349e5d2
7ea1444663

Reviewed By: yns88

fbshipit-source-id: acd16dddbbf68005392e2bc7795df22685774c2e
2020-02-07 12:52:37 -08:00
Durham Goode
f77ea84dda tests: update sparse tests
Summary:
D19776181 added more details, which breaks the tests. Let's update the
tests

Reviewed By: quark-zju

Differential Revision: D19795728

fbshipit-source-id: 80f6a47da1dd12c5d092d1f6e798a6c43eb02311
2020-02-07 12:45:29 -08:00
Durham Goode
dc9da8ef2e connectionpool: throw away the connection pool after forking
Summary:
We're seeing an error where worker processes fail to fetch data from
the server. Our theory is that the forking messes up the ssh connection, so
let's not reuse ssh connections across forks.

Reviewed By: xavierd

Differential Revision: D19794281

fbshipit-source-id: 3954cd96617fd18ecf0d0aa9b9a6ce774c494067
2020-02-07 11:45:57 -08:00
Jun Wu
3a8e77f15e run-tests: add --debug support for Python tests
Summary:
In D19581174 I made `--debug` trigger ipdb session for `.t` tests.
This diff adds similar feature for `.py` tests.

Reviewed By: DurhamG

Differential Revision: D19784795

fbshipit-source-id: 9118c74ea465320f15aa6ad5e1e04d8bc1a49966
2020-02-07 11:03:45 -08:00
Kostia Balytskyi
746cfcff24 commit_validation: validate topological order of synced commits
Summary:
Currently existing validation won't catch a bug where commits `a <- b` get
replayed as `b <- a` as long as they don't touch the same files. Let's add
such check.

Reviewed By: StanislavGlebik

Differential Revision: D19723150

fbshipit-source-id: ddc15063b9ae4fc38416ab9b96681da302fec8d4
2020-02-07 10:55:25 -08:00
svcscm
2fac725860 Updating submodules
Summary:
GitHub commits:

45de0b89c8
d4df500d88
ab1f5052ce

Reviewed By: yns88

fbshipit-source-id: 1607e1d4db95e686e6ec470228ea3667e59644ea
2020-02-07 10:55:25 -08:00
svcscm
d50bbaced2 Updating submodules
Summary:
GitHub commits:

124f7524e7

Reviewed By: yns88

fbshipit-source-id: f6c5a0d3a098ceac824889ba881ef62b6822c55d
2020-02-07 09:06:30 -08:00
Genevieve Helsel
9262283d1f diff documentation
Summary: after reviewing my stack D18647089 , chadaustin recommended some documentation surrounding this area since it is a bit more complex now, and since it was easy to deadlock and there are a lot of moving parts, I added documentation about how the diff path works, including the new code path, and other non-trivial parts.

Reviewed By: chadaustin

Differential Revision: D19688435

fbshipit-source-id: f6512340421e7c25d4fb4d27177c6187eb57ccbf
2020-02-07 07:49:35 -08:00
Harvey Hunt
6a0522aefa mononoke: Add a multiplex ID to blobstore configuration
Summary:
In order to uniquely identify a blobstore multiplexer configuration,
add an ID.

Reviewed By: krallin

Differential Revision: D19770058

fbshipit-source-id: 8e09d5531d1d27b337cf62a6126f88ce15de341b
2020-02-07 07:46:10 -08:00
Genevieve Helsel
0a2fd56bba py3 blame
Summary: plain hg blame for non-binary files

Reviewed By: quark-zju

Differential Revision: D19676073

fbshipit-source-id: 203b0421c6279ea1ca6bb6e253e7952e64b5edeb
2020-02-07 03:19:41 -08:00
Genevieve Helsel
4acc40424c hex printing on revlog match failure
Summary: fixes printing for no match found in revlog match

Reviewed By: quark-zju

Differential Revision: D19652374

fbshipit-source-id: 55bfcbff7919ad817173241e2792df27311b931e
2020-02-07 03:17:06 -08:00
Stanislau Hlebik
ea8bed30a8 mononoke: add new safe sync_commit() method
Summary:
Follow up from D19718839 - let's add a function that will safely sync a commit
from one repo to another. Other function to sync a commit are prefixed with
unsafe

Reviewed By: krallin

Differential Revision: D19769762

fbshipit-source-id: 844da3e2c1cc39ef3cd86d282d275d860be55f44
2020-02-07 01:57:50 -08:00
Thomas Orozco
41216b7530 mononoke/fastreplay: handle JSON-encoded strings in command args
Summary:
If we e.g. a getpack for path like "foo\"bar", then we can't decode it into a
`&str` because we need to allocate a new `String` to hold it. At the same time,
if the path is "foo bar", then having a reference into the JSON we received is
nicer.

Right now, we expect a `&str`, so the latter case. But, if we find command args
from the first case, we can't deserialize them. To fix this, let's use
`Cow<...>`, which lets us either have a referenced or an owned string.

Also, let's add tests to confirm this works.

Reviewed By: ikostia

Differential Revision: D19767689

fbshipit-source-id: bf9e06d4a885638073c819a25a68810ff44f2546
2020-02-07 01:26:19 -08:00
svcscm
f40726c12f Updating submodules
Summary:
GitHub commits:

93232f9556

Reviewed By: yns88

fbshipit-source-id: 8d56edc4e99f2ac5d65942a0495478815c41218b
2020-02-07 01:26:18 -08:00
svcscm
2e131ec5a8 Updating submodules
Summary:
GitHub commits:

4121390031
fdd24faa6c
94471e632b
0a24425afd
8b79c69b6c
99f3917826
3853cef0ba
5db0cb90fc
714edbb20f
880ade1420

Reviewed By: yns88

fbshipit-source-id: a63558a8df40c936d8959287f815835502b6cbd9
2020-02-06 20:51:51 -08:00
Xavier Deguillard
c8c0d9dd03 use third-party vendored Rust crates
Summary:
Instead of fetching a tarball for the vendored Rust crates, let's just use
what's present in third-party/rust.

Reviewed By: wez, fanzeyi

Differential Revision: D19770580

fbshipit-source-id: ca6615a5f5c672d9a5527ad47feab6bdd33a39db
2020-02-06 17:04:18 -08:00
svcscm
157dcf1601 Updating submodules
Summary:
GitHub commits:

4f6a2d4edf

Reviewed By: yns88

fbshipit-source-id: 5f075328153ff06bb5cac8a8f9298b8c05321ebe
2020-02-06 16:11:28 -08:00