Summary: This API will be used to spawn tasks in the runtime.
Reviewed By: andll
Differential Revision: D26615607
fbshipit-source-id: 6b9892fad755bbe8feb775e9dad457697b2ea1b7
Summary: Looks like this formatting changed in hg? This is failing on master
Reviewed By: mitrandir77
Differential Revision: D26914873
fbshipit-source-id: 91f3e1684bba1d66a740c5c605c31a8b25e42964
Summary:
Right now, if we get an error when writing to fileblob, we silently ignore it
under the assumption that it's an overwrite that failed. We shouldn't do this,
since it can cause to silently discard data.
For example, when using Mononoke with a tmpdir that isn't next to your blobs,
one might hit this error:
```
Os { code: 18, kind: Other, message: "Invalid cross-device link" }
```
Right now, we just silently ignore it and move on. With this diff, we'll
properly report that the write failed.
Reviewed By: farnz
Differential Revision: D26912990
fbshipit-source-id: 1b5a3c79c80f6b445e16e352e1c78aaec5e21850
Summary: These queries are heavier than needed, mysql optimizer needs a hint on correct index to use.
Reviewed By: johansglock
Differential Revision: D26911348
fbshipit-source-id: fc7e16edfb7d9f5e835b1e8bf7e38bab0730066e
Summary: Add a new benchmark so can measure timing in next diff.
Reviewed By: johansglock
Differential Revision: D26911760
fbshipit-source-id: 6f0df115478fa850e092d87e29d53708af8e7fa6
Summary:
While rolling out Manifold C++ client, I noticed that blobrepo creation consistently complains about a 3 to 4 second poll time:
```
W0309 02:10:41.645635 3672554 [main] eden/mononoke/blobrepo/factory/src/lib.rs:161] Slow poll() ran for 3.170361901s
```
This future is `make_blobstore` from blobstore_factory
Add some slow poll watches to `make_blobstore` and the things it calls to help identify whatever is causing the task to hold the thread for 3 seconds - this often indicates somewhere that needs to use `blocking` to have a kernel sleep run in its own thread
Reviewed By: krallin
Differential Revision: D26910472
fbshipit-source-id: ed6d4cbb7fdf59ed1a243b6c0c0739dbf5502850
Summary:
It was added for the initial rollout only so that we can fallback quickly if
needed (see D26221250 (7115cf31d2)). We can remove it now since the feature has been enabled
for a few weeks already with no big issues.
Reviewed By: krallin
Differential Revision: D26909490
fbshipit-source-id: 849fac4838c272e92a04a971869842156e88a1cf
Summary:
I've been investigating getbundle on mononoke darkstorm, and it was hard to
understand what's going on. Adding more logs hopefully should be easier.
Also fix how we log `nodes_to_send` - previously `partial_result.partial`
wasn't counted. Now it should be fixed.
Reviewed By: krallin
Differential Revision: D26909296
fbshipit-source-id: 0af6f0b8d6af0350b5c87a20146ef8c7c64b3dc8
Summary:
This teaches eden top to read input from the command line which we will use to
switch between help and main page as well as manipulate the process table.
Similar to the python version of eden top q exits. For now we spit back out all
of the other input we get.
Reviewed By: fanzeyi
Differential Revision: D26892622
fbshipit-source-id: 30039d2c2475c036c500c6cb1055c0b2d739691a
Summary:
This adds a subcommand to the rust cli for top command. This sets us up to
start moving over the eden top functionality.
Reviewed By: fanzeyi
Differential Revision: D26892621
fbshipit-source-id: 1d0525291fbad1e5ea97ca22691eacb3fe42ffaf
Summary: hgsql can only use traditional revlog. Disable changelog migration for it.
Reviewed By: kulshrax
Differential Revision: D26891252
fbshipit-source-id: 36c5a448d4fcad15b3415e4534448a945f6d0b4b
Summary: We weren't passing a repo path when initially loading the repo's config in `clidispatch`. This meant that the resulting `ConfigSet` didn't contain values from the shared-repo `.hgrc.dynamic`. Evidently, some other code path in Python would eventually add these values, but this meant that pure-Rust commands could not see config values set via dynamicconfig. Passing the path fixes the problem.
Reviewed By: DurhamG
Differential Revision: D26508980
fbshipit-source-id: 65f187d18098a08c81325e78cb02a8ed854c739a
Summary:
See the previous diff for motivation. This removes bookmarks that are
ancestor of master, too. This is important in practice.
Reviewed By: DurhamG
Differential Revision: D26889412
fbshipit-source-id: 255722ed5b486e88ef56e7e378fae3f1113d5fbe
Summary:
The auto cleanup was conservative. It keeps `::draft()`. But that means
ancestors of public commits are not cleaned up. Not all release branches
branch off the master branch.
Reviewed By: DurhamG
Differential Revision: D26889413
fbshipit-source-id: c6a8e3f32cf1f7d2ffe74b7ecd183f4e583949bb
Summary:
Normally we prohibit landing commits that might accidentally
change the x-repo mapping. However we do want to allow landing commits like
that to backup repos, because backup repos should have all commits as their
counterpart repositories.
This change also has another side-effect - we don't call `load_additional_changeset()`
which can be very expensive for backup repos because of the issues in configuration -
in particular, we don't have `hooks_ancestors_of` option set, and that caused all ancestors to be considered
as "additional changesets". It would make since more properly later.
Differential Revision: D26883910
fbshipit-source-id: 07ceb7b96bc6cae851ac6ff57071eff5cef387e4
Summary:
This allows for errors raised in these cases to be retried. Most notable is
the timeout error.
Reviewed By: johansglock
Differential Revision: D26855441
fbshipit-source-id: 6137ed1755072d43dbdd25fa092ddb21c8669aa3
Summary:
No timeout is set up by default so the process wait forever when reading bytes
in cases where the connection is lost somehow.
Reviewed By: johansglock
Differential Revision: D26855443
fbshipit-source-id: d741f73e7186fe862f3d78a806f3219c2cbe7e0a
Summary:
Abort one of the most general exceptions in Mercurial. In theory it should be
something that isn't handled. We can say at least that it shouldn't be retried.
For thing that may be transient it is better to use a different type of
exception. NetworkError is something is checked and retries in a few places so
that seems like a natural candidate.
Reviewed By: johansglock
Differential Revision: D26855444
fbshipit-source-id: f15c723293a416b5f44a6592927e3500f3b0b7d5
Summary: Timeouts are another class of errors that are relevant.
Reviewed By: johansglock
Differential Revision: D26855442
fbshipit-source-id: 8ebb83714fa3d7a2f4efcbed8bd512c98301b49d
Summary:
We ran into an issue while uploading too many blobs at once to darkstorm repo.
We were able to workaround this issue by spawning less blobstore writes at
once.
It's still a bit unclear why this issue happens exactly, but I'd like to make
the number of concurrent uploaded blobs configurable so that we can tweak it if
necessary.
Differential Revision: D26883061
fbshipit-source-id: 57c0d6fc51548b3c7404ebd55b5e07deba9e0601
Summary:
I ran into an interesting issue - git and Mononoke/mercurial store timezones
differently.
Git - From https://fburl.com/utwmsmcu:
```
Git internal format
It is <unix timestamp> <time zone offset>, where <unix timestamp> is the number of seconds since the UNIX epoch. <time zone offset> is a positive or negative offset from UTC. **For example CET (which is 1 hour ahead of UTC) is +0100.**
```
Note that CET (which is to the east of utc) is stored as +0100.
Hg - now from `hg help dates`
```
This is the internal representation format for dates. The first number is
the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
is the offset of the local timezone, in seconds **west of UTC (negative if the timezone is east of UTC)**.
```
that means that CET will be stored as -0100 i.e. with negative sign.
Mononoke - see https://fburl.com/diffusion/zf59f76j
We use FixedOffset::west_opt, and from docs (https://docs.rs/chrono/0.4.19/chrono/offset/struct.FixedOffset.html#method.west_opt)
```
Makes a new FixedOffset for the Western Hemisphere with given timezone difference. The negative secs means the Eastern Hemisphere.
Returns None on the out-of-bound secs.
```
So in order for mercurial and git to actually mean the same timezone, we need to multiply it by -1.
(note that hggit seem to be doing the same thing - https://fburl.com/code/pgdj5f2s).
You might wonder why mercurial's "hg log" now outputs the same timezone value as git - it converts it before outputting (https://fburl.com/code/ltmc66a1).
Reviewed By: krallin
Differential Revision: D26848463
fbshipit-source-id: fbd8c370565f5b663b438d0c11bddf39d090a16b
Summary: The goal is to reduce load on tokio scheduler by using threads & channels instead of spawning new task every time
Reviewed By: DurhamG
Differential Revision: D26801249
fbshipit-source-id: a8d9accc721c7ffc981fd538c06ab8cbd908f715
Summary:
AsyncVfs provides async vfs interface.
It will be used in the native checkout instead of current use case that spawns blocking tokio tasks for VFS action
Reviewed By: quark-zju
Differential Revision: D26801250
fbshipit-source-id: bb26c4fc8acac82f4b55bb3f2f3964a6d0b64014