Commit Graph

62659 Commits

Author SHA1 Message Date
svcscm
1b29098700 Updating submodules
Summary:
GitHub commits:

be71bb0a8a
5c25d3238b

Reviewed By: bigfootjon

fbshipit-source-id: 450379490f07b92cdc8da2a9e14c178bfe19a04e
2021-01-14 12:38:51 -08:00
Stanislau Hlebik
c31f187d1a mononoke: log client_ip only if source_hostname is empty
Summary:
This might be controversial, so I'd like to hear opinions.
We are running low on retention once again, and there's client_ip and
source_hostname field that have largely duplicated info and together use ~14%
of space.

I suggest to log source_hostname if it exists and client_ip if source_hostname
is not set. This should save ~7% of space since most of the time both of these
fields are set.

Reviewed By: krallin

Differential Revision: D25900993

fbshipit-source-id: f3db59e0dde44a5117059c829df7a1a1c811f641
2021-01-14 10:28:46 -08:00
Alex Hornby
2d0b7db627 mononoke: allow cmdlib init_logging to return a Result
Summary: Allow us to return arg parsing errors rather than panicing

Reviewed By: krallin

Differential Revision: D25837626

fbshipit-source-id: 87e39de140b1dcd3b13a529602fdafc31233175d
2021-01-14 09:52:40 -08:00
Alex Hornby
987b99d268 mononoke: chunk bulkops ChangesetEntry reads differently from the id reads
Summary: ChangesetEntry query is a more constrained query where we know the ids, can issue query in chunks separately

Differential Revision: D25804024

fbshipit-source-id: 6627fa17ee155182285997cb0642c7d7f033da26
2021-01-14 09:52:40 -08:00
Alex Hornby
32ed0fbffe mononoke: allow fetch_ids() to use read replica
Summary:
Allow use of read replica when fetching bulk ids.  Bulkops clients not needing most up to date bounds can use this mode providing they are not checkpointing the repo min/max ids.

Existing default behaviour is unchanged.

Differential Revision: D25804028

fbshipit-source-id: ca14e929ea94c351e27eed2aa012fe914c8c691e
2021-01-14 09:52:40 -08:00
Alex Hornby
b98566c3f9 mononoke: spawn the bulkops id query
Summary: I was seeing mysql timeouts (where client doesn't consume query results within 10s) in walker runs using fetch_id().  Spawning the query means the results are collected and ready when we do end up polling.

Differential Revision: D25804025

fbshipit-source-id: 443dd87028fe68de16c174deb7b017d7ce5439d1
2021-01-14 09:52:40 -08:00
Alex Hornby
d9587b0bc8 mononoke: implement bulkops fetch() in terms of fetch_id()
Summary: Simplify the code by allowing us to remove the old windowing logic.

Differential Revision: D25804022

fbshipit-source-id: 1f2837c2f83adcb3afdb453a9220ac68509a36ec
2021-01-14 09:52:39 -08:00
Alex Hornby
7d04c24a91 mononoke: limit based queries for bulkops fetch_id
Summary:
When querying for changesets in a repo,  often there are very few changesets for a repo inside a 65536 wide range of ids, which means multiple round trips to the database.

This change adds a LIMIT based mysql query that can always return up to the specified limit rows if the repo has them, and then using bounded_traversal_stream to unfold from the highest id loaded from that query to the next chunk to be loaded.

Reviewed By: StanislavGlebik

Differential Revision: D25804023

fbshipit-source-id: 46df2ea48d01bc4143d96642e45066f520faa4d6
2021-01-14 09:52:39 -08:00
Giorgi Papakerashvili
aa984b0835 tests: Fix UnusedVariable in xattr_test.py
Summary: **expected_sha1**  was  declared but not used in **xattr_test.py** file, removing this unused variable and variables which was used to creat **expected_sha1**

Reviewed By: xavierd

Differential Revision: D25899401

fbshipit-source-id: 26f0bb06d2c96e7f6754a4b821ffe4cf59a2f35e
2021-01-14 01:23:42 -08:00
svcscm
1f72f76649 Updating submodules
Summary:
GitHub commits:

9a8901e8e8
65805352a1

Reviewed By: bigfootjon

fbshipit-source-id: bc59d492bd69b609a9c2442fbd3f7b0705c4b0d3
2021-01-14 01:23:42 -08:00
svcscm
17c045e5df Updating submodules
Summary:
GitHub commits:

293f9846d1
c61fd6acdc
62e692d19b
25ce99fc43
326b7f910e
61437a5ac3
f571d1d16e
db781de543
d4ec8ae5af
e582399e55
2f5b06928d
391e5d7dc8

Reviewed By: bigfootjon

fbshipit-source-id: 94fe17b4f5b1691733714c68daa3cf06e5938f2f
2021-01-13 13:53:38 -08:00
Pedro Eugenio Rocha Pedreira
3157d5d1b0 Add support for extra_cmake_defines
Summary:
`extra_cmake_defines` are extra flags that are passed to cmake when
compiling each one of the dependencies. For instance:
```
$ ./opensource/fbcode_builder/getdeps.py  build f4d --extra-cmake-define='{"CMAKE_CXX_FLAGS": "-mavx2 -mfma -mavx -mf16c -march=native"}'
```
It takes a json map as input, which can take a list of defines (key value
pairs).

Reviewed By: wez

Differential Revision: D25855781

fbshipit-source-id: 7f4fef2c66f4d12f23c8d7086d6a4f24fcc01ff7
2021-01-13 13:23:35 -08:00
Zeyi (Rice) Fan
cd588e0099 doctor: work around pyre warnings
Summary: angery_pyre

Reviewed By: xavierd

Differential Revision: D25891693

fbshipit-source-id: 570f92f6d64cf29f548851278767429ba14ce912
2021-01-13 13:04:06 -08:00
Alex Hornby
c60566eb58 mononoke: pass session id by reference in blobstore stats
Summary: Small improvement, can pass by reference

Reviewed By: krallin

Differential Revision: D25898714

fbshipit-source-id: f1012b7d947e1ead00cd9c032fea3f3aa04a3072
2021-01-13 09:38:24 -08:00
Alex Hornby
36db9100db mononoke: remove some cloning in multiplexblob
Summary: Spotted these were unnecessary

Reviewed By: krallin

Differential Revision: D25898715

fbshipit-source-id: d4e78462d93a84baecedd019100a0af2ac7224b6
2021-01-13 09:38:24 -08:00
Stanislau Hlebik
9f44f99c13 mononoke: log lowest generation number of the heads from getbundle
Summary:
We seem to get cpu spikes. The theory is that it happens  because of a commit with
low generation number lands which triggers a slow path in getbundle code. Note that I've landed two
optimizations (D23824204 (609c2ac257) and D23599866 (54d43b7f95)) which *should* help, however at the
moment threshold for what to consider a log generation number is too low so the
optimization doesn't kick in.

I'd like to verify this theory, hence adding this logging.

Reviewed By: ahornby

Differential Revision: D25884345

fbshipit-source-id: 9686933726ff0a3ae11b541b3738eb08d011abe0
2021-01-13 09:23:42 -08:00
Evgenii Kazakov
539362bae5 mononoke/derived_data: Replace error("{0}") with error(transparent)
Summary:
In this diff I've replaced non-transparent error definition error("{0}")  with error(transparent).

The reason is non-transparent errors print the same thing as the original errors:

```
Error: failed to complete task
Caused by: other error description       <-- this duplicate shouldn't be here
Caused by: other error description
```

Reviewed By: krallin

Differential Revision: D25899411

fbshipit-source-id: e586af86b635a7e2fbf8952297171c546b859300
2021-01-13 08:01:38 -08:00
svcscm
0758f60733 Updating submodules
Summary:
GitHub commits:

5dd76f7851
654a93a6f7

Reviewed By: bigfootjon

fbshipit-source-id: 4c84c421fbffc17b8e106f228a54ebbfecb5c2a5
2021-01-13 08:01:38 -08:00
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