Commit Graph

62491 Commits

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

6bc74fbd00

Reviewed By: bigfootjon

fbshipit-source-id: a38748580ac9a2f068b7dac6b1d8ddb200958c66
2021-01-13 01:49:27 -08:00
Jun Wu
5a84769bb4 revisionstore: clean up old logs for RotateLog storage
Summary:
Use the new API to clean up stale logs at open time. This hopefully helps
releasing disk space on Windows if the normal rotation fails to remove
old files being mmap-ed by other processes.

Reviewed By: xavierd

Differential Revision: D25894282

fbshipit-source-id: a3d8247b737dd451ee68b58cc5a38fdd2822c0c3
2021-01-12 21:38:03 -08:00
Jun Wu
0311047b05 indexedlog: add an API to manually clean up rotated logs
Summary:
Previously rotation only happens at flush time and file deletion is a best
effort (it might fail on Windows). For use-cases that are sensitive about
space usage that's suboptimal. This diff adds an API to remove old files
manually so high level logic can choose to clean up old files after open().

Reviewed By: xavierd

Differential Revision: D25894283

fbshipit-source-id: fbffff426544b39349ddf3537d46954d3cab5d12
2021-01-12 21:38:03 -08:00
svcscm
4e7f5aae54 Updating submodules
Summary:
GitHub commits:

cc3d5331e5
8c9a723d0b
7a6097ce4b
726a79a474

Reviewed By: bigfootjon

fbshipit-source-id: a8f07ba9c8edde0e317f84ce517c3cfd3629d2e7
2021-01-12 18:54:19 -08:00
Jun Wu
f11d555a3a fsmonitor: add threshold of nonnormal files to update
Summary:
Previously, the fsmonitor state update logic will skip updating treestate if the wlock
cannot be obtained. D17468790 (8d4d0a66a2) made it wait for wlock for the painful "watchman fresh
instance" case. But things can still suck if it's not a "fresh instance" but there are just
too many nonnormal files.

This diff makes it that exceeding a threshold of nonnormal files will trigger a fsmonitor
state write as an attempt to to reduce the number of nonnormal files. In additional,
`--debug` was changed to print more internal states for debugging.

This would hopefully address issues where people have a large "nonnormal"
treestate, suffers from the bad performance issue and cannot recover from it
automatically.

Reviewed By: DurhamG

Differential Revision: D25794083

fbshipit-source-id: 741426cf31484d9318f9cfcab11d38da33ab5067
2021-01-12 16:26:48 -08:00
svcscm
cdda325255 Updating submodules
Summary:
GitHub commits:

97e83b1249

Reviewed By: bigfootjon

fbshipit-source-id: 861d98f3b3f84af27f0eaf650b08235b2b7642a2
2021-01-12 16:07:50 -08:00
generatedunixname89002005307016
af733f885f suppress errors in fbcode/eden - batch 1
Differential Revision: D25887472

fbshipit-source-id: 764bd144cce04172ec7c86061d9c79a17474c66f
2021-01-12 15:47:27 -08:00
svcscm
d093ee27e8 Updating submodules
Summary:
GitHub commits:

f66091b029
69ab6ff9ae
d5f1e9a7a8

Reviewed By: bigfootjon

fbshipit-source-id: e9bf9a84aae4dd747b35a31195a973d743aa4f5a
2021-01-12 15:32:36 -08:00
Stanislau Hlebik
5d6f0d9c7e mononoke: add an integration test for megarepo unbinding
Summary:
We are going to write docs on how to unbind repositories and bind them later.
This integration test is a "test for documentation" i.e. it should run the same
steps as we'd run ourselves whenever we need to rebind.

The key part here is that we do a merge of unbound small repo into large repo commits

Reviewed By: ikostia

Differential Revision: D25883873

fbshipit-source-id: fac1d7871e52f4e1aa7f15d32d39f2755b803cd3
2021-01-12 14:45:56 -08:00
Stanislau Hlebik
f58473b0d1 mononoke: add sync_commit_and_ancestors command to megarepotool
Summary:
Add a command that will unconditionally rewrite commits from one repo to
another. This is similar to what x-repo lookup thrift api does, however this
command doesn't do a few safety checks (in particular, it allows to rewrite
public commits).

This is going to be used for unbinding procedure.

Reviewed By: ikostia

Differential Revision: D25883874

fbshipit-source-id: a40eda9aa40ef7ad63e2403d956871940dd1601d
2021-01-12 14:45:56 -08:00
Jun Wu
91ab840c4b logginghelper: stop logging obsstore size
Summary: We don't use obsstore. Its size is irrelevant.

Reviewed By: singhsrb

Differential Revision: D25876066

fbshipit-source-id: 5657c3ca08f5ed1cb5a3d1a5b3395ab74756b7e5
2021-01-12 14:09:08 -08:00
Jun Wu
f89a14f6b7 revlog: change ntcapacity and ntlength to size_t
Summary: It's used for malloc / realloc which take size_t instead of unsigned int.

Reviewed By: StanislavGlebik, xavierd

Differential Revision: D25890562

fbshipit-source-id: e2787786e9b995431c50b411d77cbce438a82c98
2021-01-12 13:56:11 -08:00
svcscm
d2e0db96b3 Updating submodules
Summary:
GitHub commits:

fc1ee872d4
3050c0e420
e5a8add567

Reviewed By: bigfootjon

fbshipit-source-id: b40f9e517c5ff176e0612b9f561d06e5a09d21c1
2021-01-12 13:56:11 -08:00
svcscm
660c8fb9fb Updating submodules
Summary:
GitHub commits:

ca45993f45
1d378cf764
a1e7bf5222
15bf39b712

Reviewed By: bigfootjon

fbshipit-source-id: 9b326bb7258f5a2b5a138d786e1e6622cb7fc90c
2021-01-12 12:47:07 -08:00
svcscm
287fed2398 Updating submodules
Summary:
GitHub commits:

997284755c
bc6f545cfb
42c021b53e
14f0d34d59

Reviewed By: bigfootjon

fbshipit-source-id: 2e5849b9fb2b47e01ab5b4e1cd58d5883ddc9565
2021-01-12 12:47:07 -08:00
svcscm
2b05a70fef Updating submodules
Summary:
GitHub commits:

60b024e14e
76c5932e2d
fee201ca97

Reviewed By: bigfootjon

fbshipit-source-id: 0f8d50290548b18e35cc5824752255b8dc834924
2021-01-12 10:00:02 -08:00
generatedunixname89002005307016
97bfc8ffe0 suppress errors in eden
Differential Revision: D25883811

fbshipit-source-id: dcd77f6ead09e68eca90d7bf3f78d13d4e51c0e7
2021-01-12 06:48:12 -08:00
svcscm
13cf8c1377 Updating submodules
Summary:
GitHub commits:

25ec9bc367
f85e549ce6

Reviewed By: bigfootjon

fbshipit-source-id: 449b128ff3c484a8d29a8bef12bcab0ec824b370
2021-01-12 05:22:39 -08:00
Stanislau Hlebik
d844814697 mononoke: sort params lexicographically in megarepo tool
Summary: This is a bit nicer to read

Reviewed By: ahornby

Differential Revision: D25881919

fbshipit-source-id: 3c97390a96410a18e8fdc6cb6279b2d46e407cd3
2021-01-12 03:57:21 -08:00
Stanislau Hlebik
25dd1c5313 mononoke: move commands relevant to gradual merge close to each other
Summary:
I think it's nice to group them together. Also while there I sorted both groups
lexicographically

Reviewed By: ahornby

Differential Revision: D25881918

fbshipit-source-id: 05bb9f07ee7799c3d5c19a8ffaabadaca635fef2
2021-01-12 03:57:21 -08:00
svcscm
4e15521249 Updating submodules
Summary:
GitHub commits:

d9eec9f82e
c585a49b5c

Reviewed By: bigfootjon

fbshipit-source-id: 1a658c89f3093f5e46803ac95447ec505f0bac7a
2021-01-12 03:34:23 -08:00
Stanislau Hlebik
89419c0b68 mononoke: remove some of the copy-paste in megarepo tests
Reviewed By: ahornby

Differential Revision: D25868078

fbshipit-source-id: ea3fd6997a882edb23ab9baf0c7f5466c41d5053
2021-01-12 03:06:18 -08:00
svcscm
88632675eb Updating submodules
Summary:
GitHub commits:

1620ef2e35
5fdbd35fde
0baba6e8aa
f7daf90b53

Reviewed By: bigfootjon

fbshipit-source-id: bd07ac577123683b9b9cfe706b546b560f4d443d
2021-01-12 03:06:18 -08:00
svcscm
f0dafed1be Updating submodules
Summary:
GitHub commits:

34736f8ea4
083e0122a7
fd2fbf5f04

Reviewed By: bigfootjon

fbshipit-source-id: 94a8b23e4f87057c5c342383a3dafc4ae04ed548
2021-01-12 01:51:29 -08:00
Zeyi (Rice) Fan
dd61936581 doctor: add facebook-specific doctors
Summary: Certain doctor items are not meaningful outside Facebook. This diff adds the ability to have Facebook-specific doctors.

Reviewed By: xavierd

Differential Revision: D25789275

fbshipit-source-id: 94160be741a8fc3e8d01e86beaa0d2428952db21
2021-01-11 21:30:07 -08:00
svcscm
5073cd371c Updating submodules
Summary:
GitHub commits:

8c731f8578

Reviewed By: bigfootjon

fbshipit-source-id: 1be9238e4a1c1f26e745557b4ac2fa063445c44c
2021-01-11 21:30:07 -08:00
svcscm
4b66e21018 Updating submodules
Summary:
GitHub commits:

4e00e73074
6a81c741bd

Reviewed By: bigfootjon

fbshipit-source-id: d35a26335ade5d93c926d7e17b9c4c346eded200
2021-01-11 18:32:33 -08:00
Evgenii Kazakov
579e3cbd1c mononoke/lfs_server: Update Mononoke LFS reverse DNS lookups to use the trust-dns crate
Summary:
Before this diff, we did DNS lookups using a crate called `dns_lookup`. This crate is a thin layer over libc DNS lookups. Those lookups are blocking (i.e. they hold a thread), so they're not very friendly to asynchronous code. We currently offload them on a dedicated thread pool to mitigate the issue, but this isn't ideal: if we experience e.g. slow DNS responses, we could saturate this thread pool pretty easily.

I updated it to use the trust-dns crate, which provides an asynchronous implementation of DNS lookups, and is currently used in other parts of Mononoke.

Reviewed By: krallin

Differential Revision: D25849872

fbshipit-source-id: 826ab4e5618844f3b48e5def4ad9bd163753ebb1
2021-01-11 18:03:11 -08:00
Stefan Filip
a9a2610cf8 tests: remove test-hgext-repogenerator.t
Summary: Unstable test.

Reviewed By: quark-zju

Differential Revision: D25879146

fbshipit-source-id: 09e41fc1e43644bba50f713a095e8a4b8c4f520a
2021-01-11 17:58:02 -08:00
svcscm
8f970c44c7 Updating submodules
Summary:
GitHub commits:

a734cee8a8

Reviewed By: bigfootjon

fbshipit-source-id: c979b8d2e2b1e46c9eb9b2ec21bd64920226ca2c
2021-01-11 17:58:02 -08:00
svcscm
ab6b18864d Updating submodules
Summary:
GitHub commits:

200d7144cc
8552fc7fe3
a74807f5b5
1297d592f6
b9cb2c226d
77b4bfe511
4e69c0513f
f493c97b33
7a9bd1c2f8

Reviewed By: bigfootjon

fbshipit-source-id: 1f6960f07cc38e955e9b6ba1faa4ea9f60b5dab7
2021-01-11 16:19:22 -08:00
Daniel Xu
f83fb64f3e Do full regen
Summary:
D25850262 (772680f2f7) updated a dep but only did a partial regen. This broke
other diffs.

This diff does a full regen to sync up again.

Differential Revision: D25872444

fbshipit-source-id: b5749b3d634ffe355a5a3cf6e94066ca5158001f
2021-01-11 16:14:36 -08:00
Daniel Xu
4a21a5a1cf Regen autocargo files
Summary: See previous diff

Differential Revision: D25858200

fbshipit-source-id: 3745b5c7dac6ee514b05ce130b62b35302916bee
2021-01-11 16:14:36 -08:00
Jun Wu
027709fa36 pull: use the new repo.pull API if possible
Summary:
The `pull` commmand has a lot of tech debt (with issues like inefficiency, race
conditions, named branches, etc). The new `repo.pull` API isn't designed to
support all legacy usecases.

This diff switches a subset of `pull` command that the new API can support to
the new API. It should solve race condition or `visibility.add` inefficiency
issues (ex. 20s on addgroup, 187s on visibility.add - P154836357).

Logic related to remotenames was ported from the remotenames extension.
The selectivepull tests seem strong enough to check their behaviors.

The new pull API is used by commit cloud for many months. So I turned the
new code path on by default. It can be turned off by changing
`commands.new-pull`.

There are a few test changes. The new behavior seems more correct overall:
- test-commitcloud-switch-workspace.t
  - "M/F" swap is caused by rev number: both are correct
  - "S: public remote/stable" is more correct than "S: draft"
- test-commitcloud-sync-rb-deletion.t
  - "draft1: draft remote/scratch/draft1" is more correct because
    "remote/scratch/draft1" is listed in the "book --list-subs"
    command above.
- test-commitcloud-sync-rb-enabling.t
  - "public1: draft" not showing up is more correct.
- test-fb-hgext-remotefilelog-lfs-prefetch.t
  - Difference seems to be caused by rev order.

Reviewed By: markbt

Differential Revision: D25562089

fbshipit-source-id: ac22b2f0492ab53517d580d706dfbc823fd0e0cc
2021-01-11 13:28:15 -08:00
Jun Wu
844cba11bf pull: make pulled commits visible even if they exist
Summary:
Make the `pull` API update visible heads even if all commits exist locally.
This is a more expected behavior, and will make the "pull" command using the
pull API simpler.

Reviewed By: markbt

Differential Revision: D25562091

fbshipit-source-id: 8a43cfe4afd31d3cb9ad5369a6081de120043168
2021-01-11 13:07:52 -08:00
Jun Wu
ef2d44f1e3 pull: try to avoid adding public heads via repo.pull
Summary:
Filters out some obviously public heads at the end of repo.pull so they don't
get passed to `visibility.add`. Note: this just removes some obviously "public"
commits without considering the graph. A stronger guarantee would be removing
public heads at metalog commit time.

Reviewed By: markbt

Differential Revision: D25562092

fbshipit-source-id: cc6a19252fcfe305e3a14895b61ab0d6b84a007e
2021-01-11 13:07:52 -08:00
Shai Szulanski
dba656e44d Rename Try::throwIfFailed -> throwUnlessValue
Summary: Update name to match usage of Try as tri-state, since this method also throws if the Try is empty

Reviewed By: yfeldblum

Differential Revision: D25737810

fbshipit-source-id: a4166153362f07353d212216fbaf7105867eef2a
2021-01-11 13:05:17 -08:00
svcscm
380b679a8c Updating submodules
Summary:
GitHub commits:

d8b2b7f4fb
74afdc3a22
0a9f78d2c8

Reviewed By: bigfootjon

fbshipit-source-id: 79df570f4465612d3609cfb321e04a0a80310659
2021-01-11 12:56:09 -08:00
Xavier Deguillard
4cdbffe823 integration: allow OSS integration test to build on Windows
Summary:
On Windows, since Mercurial doesn't yet build with Buck, we need to test
against the system Mercurial, thus remove the dependencies to //eden/scm:hg for
the tests. Also remove various dependencies that don't build yet on Windows.

This allows for the tests to run, but fail while trying to execute edenfsctl.par.

Reviewed By: kmancini

Differential Revision: D25807727

fbshipit-source-id: c2533eedc361cc6db9fdf2190476c3d52833139d
2021-01-11 12:06:14 -08:00
Alex Hornby
a311deeefc mononoke: add PublicChangesetBulkFetch::fetch_ids
Summary: Add a method to get just the ids. This is a new best case for the fetching, so updated the benchmark as well.

Reviewed By: StanislavGlebik

Differential Revision: D25804027

fbshipit-source-id: ccc4573c8a4ebc07db854a0ffa737f572087019e
2021-01-11 10:55:39 -08:00
Alex Hornby
c11cdc23ed mononoke: test bulkops vs bonsai expectations
Summary: Simplify the tests for bulkops, no need to map to hg to check the expected changesets.   Can compare to expected bonsai directly instead as its simpler

Reviewed By: StanislavGlebik

Differential Revision: D25804020

fbshipit-source-id: eb4381c37ed6a4fb1e213f0397ffb2136ddee473
2021-01-11 10:55:39 -08:00
Alex Hornby
ce85f95e55 mononoke: add choice of direction to bulkops
Summary: When scrubbing repos it is preferable to scrub newest data first.  This diff adds Direction::NewestFirst to bulkops for use in scrubbing and updates existing call sites to Direction::OldestFirst so as not to change behaviour

Reviewed By: StanislavGlebik

Differential Revision: D25742279

fbshipit-source-id: 363a4854b14e9aa970b2c1ec491dcaccac7a6ec9
2021-01-11 10:55:39 -08:00
Alex Hornby
941cdc48b2 mononoke: use iter::step_by in bulk ops windowing
Summary: Preparation for adding OldestFirst vs NewestFirst direction of fetching in next diff.

Reviewed By: StanislavGlebik

Differential Revision: D25742281

fbshipit-source-id: 655f297efc2094d4325717d97cce53e697c35597
2021-01-11 10:55:39 -08:00
Alex Hornby
c8b4d5d2d8 mononoke: add bulkops benchmark
Summary: Add a benchmark tool for bulkops that uses the criterion benchmarking framework. This is so we can measure effect of optimizations later in stack.

Differential Revision: D25804026

fbshipit-source-id: 71b8addf1145c0ecb69d6392b4602172f2b52080
2021-01-11 10:55:39 -08:00
Thomas Orozco
9d7b0267dd revisionstore: pass client correlator
Summary:
We used to get those in the old (Python) LFS extension, but didn't have them in
the new one. However, this is helpful to correlate requests to LFS with data in
hg logs. It's also convenient to be able to identify whether a set of requests
are part of the same session or not.

This diffs threads the client correlator through to the LFS store from the
Python, similarly to how it's done in EdenAPI.

Reviewed By: DurhamG

Differential Revision: D25804930

fbshipit-source-id: a5d5508617fa4184344834bbd8e3423816aa7668
2021-01-11 10:46:20 -08:00
Stefan Filip
691d8f7ef2 hgcommands: downgrade to indicatif 0.14
Summary: The dependency that we want to share is 0.14 instead of 0.15.

Reviewed By: singhsrb

Differential Revision: D25871110

fbshipit-source-id: 16e9f8a858ee04a47867c2916909edfc996f8bc4
2021-01-11 10:03:51 -08:00
Mark Juggurnauth-Thomas
a7e8a2c5c2 crdump: add manifest_node to crdump output
Summary:
Add `manifest_node` to the crdump output, which is the root manifest node of the commit.

This is useful for detecting commits that have the same tree content but
different metadata (e.g. if only the commit message has been edited).

Reviewed By: singhsrb

Differential Revision: D25782674

fbshipit-source-id: dfdf426833533140b676eee82e123a0cba23c77a
2021-01-11 07:30:35 -08:00
Alex Hornby
30d87db8eb mononoke: update callsites to use PublicChangesetBulkFetch::fetch
Summary:
We had a mix of callsites using fetch_all_public_changesets directly vs those using the PublicChangesetBulkFetch::fetch.

Update callsites to use PublicChangesetBulkFetch::fetch for consistency.  This also has the nice side effect to removing some explicit config_store usage.

Reviewed By: StanislavGlebik

Differential Revision: D25804019

fbshipit-source-id: 5a88888dd915d1d693fb26ffe3bb359c9e918d5c
2021-01-11 03:52:36 -08:00
Thomas Orozco
b7dd3b1699 mononoke/lfs_server: log HTTP-server level errors
Summary:
Right now, we have zero visibility HTTP level errors (such as broken pipes),
because this is all set up on Gotham with no logging. This diff moves the
bootstrapping from Gotham to us to fix this.

There's a bit of code I'd like to deduplicate here, but it's tricky to do given
that the code is a little different in the HTTP vs. HTTPS branches. For now,
this will give us some logging we need without too much effort. We can make it
more robust (and route it to Scuba or give it session IDs) if this proves
useful.

Reviewed By: StanislavGlebik

Differential Revision: D25851426

fbshipit-source-id: 4ca5d1ecb3931715f04af735aa1b7cfdac87846d
2021-01-11 03:32:26 -08:00
Thomas Orozco
772680f2f7 third-party: rust: update Gotham to 0.5
Summary:
This updates Gotham. Under the hood I rebased our fork, you can see the diff
here: P161171514.

The stuff that is relevant is that Gotham got rid of its dependency on
`failure` and now uses `anyhow` instead, and I also added a little bit to our
existing socket data patch by making a few things public so that we can get
access to a few more internals.

Reviewed By: StanislavGlebik

Differential Revision: D25850262

fbshipit-source-id: 25ebf5d63be39e3e93208705d91abc5c61c90453
2021-01-11 03:32:25 -08:00