Commit Graph

62586 Commits

Author SHA1 Message Date
Kostia Balytskyi
e74174283d megarepotool: extract chunked deletion from pre-merge-delete
Summary: We will use it in a separate subcmd later.

Reviewed By: StanislavGlebik

Differential Revision: D25944075

fbshipit-source-id: 211063ef74b192c18b5d006e9e0592085fdfc811
2021-01-18 04:41:27 -08:00
Alex Hornby
395ec9dbeb mononoke: remove Scrubbing enum, all callsites had same value
Summary: This enum no longer serves a purpose,  delete it

Reviewed By: ikostia

Differential Revision: D25927254

fbshipit-source-id: 6731d6a57313946ee70b301ebc4f5cd634a90e61
2021-01-18 03:15:52 -08:00
Alex Hornby
c291e6cbb3 mononoke: remove unused open_scrub_repo from cmdlib
Summary: Nothing using this,  remove

Reviewed By: ikostia

Differential Revision: D25927256

fbshipit-source-id: 8f3b970fa5c001eca5440c9ab1977631e6205f47
2021-01-18 03:15:52 -08:00
svcscm
0113615e48 Updating submodules
Summary:
GitHub commits:

fa61078899
2b30915df6
ecd896ea15
6065875a2d
af36901c2c
5c2df92bd7

Reviewed By: bigfootjon

fbshipit-source-id: 123fa5c3aded757e1d47d54f7931f1689de9db02
2021-01-17 16:45:12 -08:00
svcscm
979ca02201 Updating submodules
Summary:
GitHub commits:

53512c6c50
b18defe4e9
6673e6dac2

Reviewed By: bigfootjon

fbshipit-source-id: f78275000e854852a561180490188e2ee6343b5d
2021-01-17 14:29:28 -08:00
svcscm
fda98b5a6d Updating submodules
Summary:
GitHub commits:

194b7732bd

Reviewed By: bigfootjon

fbshipit-source-id: 8733731d40760010d75125837269e565d9710d15
2021-01-16 15:22:43 -08:00
svcscm
c943294b53 Updating submodules
Summary:
GitHub commits:

6a6ea7ca1c

Reviewed By: bigfootjon

fbshipit-source-id: ec54e463074b297887b9b20e54aa04b95b02b042
2021-01-15 15:21:12 -08:00
Evgenii Kazakov
b873f821ca mononoke/cmds/admin: Add entry_id to admin bookmark log
Summary:
Output of BookmarkUpdateLog.list_bookmark_log_entries method in eden/mononoke/blobrepo/src/repo.rs was extended with bundle_id.

This allows to improve bookmark logs in admin tool: now it prints bundle_id as a first column:

```
I0114 16:53:00.592448 413912 [main] eden/mononoke/cmdlib/src/args/mod.rs:1477] using repo "instagram-server_test" repoid RepositoryId(502)
12637312 (master) 296a8f7c7ac785eeb2437d4676aeb3fbf6e690b1 pushrebase Nov 27 09:06:23 2020
12637526 (master) 4be9b55e41af535128e53eb04fedc830522799f6 pushrebase Nov 27 09:43:10 2020
12637462 (master) ffff84c16fcc81ee5d3eb6ea037c58f2c0f7ac04 pushrebase Nov 27 09:32:14 2020
12637540 (master) 7859f7b8beefab7fb44f771fa733694e6b8fa2d4 pushrebase Nov 27 09:44:59 2020
10095754 (master) dcf7c54125b29a0d4ea404f6c056c9ccb0d27666 pushrebase Sep 10 17:41:48 2020
12637464 (master) 747f205265ca52d2fc98fbba82c18ca17b4dd02e pushrebase Nov 27 09:32:36 2020
12637527 (master) b1a1500888f4d49ad1bc29be84c285eddd26b1ce pushrebase Nov 27 09:43:25 2020
12637520 (master) 440863d2b0a43cd039e26442e9c5786a6d933b21 pushrebase Nov 27 09:42:15 2020
12637522 (master) 2349c7c21b40b06547085f2a76ddef55a1ab4379 pushrebase Nov 27 09:42:38 2020
12637466 (master) 5c607e8575b2e6488b09b1580ff614d67ab1c723 pushrebase Nov 27 09:32:51 2020
```

Reviewed By: ikostia

Differential Revision: D25918315

fbshipit-source-id: 22955e6b839a93e3e3c5b53ee73486f599cf5bda
2021-01-15 14:38:28 -08:00
Thomas Orozco
01066085fa eden: log stack traces in debugimporthelper
Summary:
I've been seeing this hundreds of times / day in my Eden logs:

```
2021-01-07 09:19:19,702 Fetching failed, continuing as this may be spurious: Expected type that converts to PySequence but received set
```

Unfortunately, those logs are really not very helpful, because that error
doesn't tell you anything about where it occurred. I do however care about them
because they have correlated with slowness in Eden for me :)

At the same time, this error is a bit important: The last time we had an issue
here, it turned into a SEV. That was because the fallback was buggy, but it
does suggest that we do not expect to be routinely falling back.

So, let's log more.

Reviewed By: xavierd

Differential Revision: D25924077

fbshipit-source-id: f59d81cc51786f94f747142ec4baaca78f3072c2
2021-01-15 09:59:01 -08:00
svcscm
5d084056f1 Updating submodules
Summary:
GitHub commits:

118e914136

Reviewed By: bigfootjon

fbshipit-source-id: 19364bec849944747caa5231611bb74f9047008b
2021-01-15 08:59:40 -08:00
Ava Spataru
591b6782f2 Mononoke LFS: allow sharding content across > 1 host
Summary:
To ensure that a specific content gets sharded to multiple tasks (by tasks_per_content config parameter) each content can have multiple routing keys. These are the SHA256 (as before) or the SHA256 suffixed with "-1", "-2" etc..

When the routing key is generated for an item, one of them is picked randomly.

Added config constraint to ensure that the number of tasks parameter is at least 1.

Reviewed By: krallin

Differential Revision: D25886402

fbshipit-source-id: fb8911dad07d2f0b6bbf57b4ede084428fe6c49d
2021-01-15 06:53:14 -08:00
Alex Hornby
bd4c512f2c mononoke: fix walker stats delta per s in last log of run
Summary:
Include changes since the last progress update (if any) in the final delta and total time logged.

When not chunking this was a minor inaccuracy, but when chunking in small chunks it would mean a lot of stats for each chunk were missing as if a chunk took less than 5 seconds there might not even have been a progress update before this end state.

Reviewed By: StanislavGlebik

Differential Revision: D25852274

fbshipit-source-id: 6cea76e3abd37908475052947794eed442a1ac82
2021-01-15 03:13:28 -08:00
Alex Hornby
8542996b64 mononoke: include root types in walker reachable_graph_elements
Summary:
When the root type is e.g. Changeset allow edges from ChangesetToX

This is important for chunking,  doing it independently to check it doesn't break non-chunked behaviour.

Reviewed By: krallin

Differential Revision: D25742294

fbshipit-source-id: ea4c989e9f61b30094d0fd83e543fe14a38254fd
2021-01-15 03:13:28 -08:00
Alex Hornby
1d1c2a293f mononoke: update walker loaded count log ready for chunking
Summary:
Calling the count Final doesn't make sense when chunking as it can appear more than once per tail, so update it to something more appropriate.

Seen is the count of Nodes seen in the stream. Loaded is the count of nodes where NodeData was loaded.  When chunking some deferred Nodes will be seen but not Loaded.

Reviewed By: krallin

Differential Revision: D25742283

fbshipit-source-id: 1f10007d94ad2dbd750bfa53bab3e46a2caad7fa
2021-01-15 03:13:27 -08:00
Alex Hornby
76ecf0567a mononoke: remove ignored log types from walker tests
Summary: This logging was being globbed away in tests. Disable it to make tests easier to read

Reviewed By: krallin

Differential Revision: D25742287

fbshipit-source-id: dfba05a688c9b1a56d6ab8746df2df3ea885c239
2021-01-15 03:13:27 -08:00
Alex Hornby
5f13fe1dec mononoke: make walker logging optional via tags
Summary: Add ability to turn on or off various types of logging,  allows removing boilerplate in test cases.

Reviewed By: krallin

Differential Revision: D25742284

fbshipit-source-id: bbbe7f477156fc49ff6779f9a09e1b397ff6f618
2021-01-15 03:13:27 -08:00
Alex Hornby
cbe292e69e mononoke: remove walker root logging
Summary: This logging was always being globbed away, so remove it

Reviewed By: krallin

Differential Revision: D25742292

fbshipit-source-id: 75e004d3fdadc617f479beee44999692c267d2a9
2021-01-15 03:13:27 -08:00
Alex Hornby
d17ec72093 mononoke: add log tag filtering to cmdlib
Summary:
Add arguments to cmdlib so we can filter log messages by the slog tag, using new Drains added in slog_ext.

To use tagging from slog the form is:

```
const FOO_TAG: &str = "foo";
info!(logger, #FOO_TAG, "hello foo!");
```

Reviewed By: krallin

Differential Revision: D25837627

fbshipit-source-id: b164d508a2e82a80c4ff6f5f35c0c722257b9a2a
2021-01-15 03:13:27 -08:00
svcscm
2bdabd2842 Updating submodules
Summary:
GitHub commits:

e6de89ff5d
442466ab94
6e248218fd
6ba7023023
68eb6115a4
f51111562b
bf62d924ac
b84466f833
510b690fbb
1517bd06f0
1807648882

Reviewed By: bigfootjon

fbshipit-source-id: 476a82005c7dc5400a0a558213468465be303eb4
2021-01-15 03:13:27 -08:00
svcscm
e917e5b483 Updating submodules
Summary:
GitHub commits:

74b224b90a
31a5538916
75cff3f09e
63154657da
1d311072e0
a13efe6881
74836f0d61
8750826f3f
e9701779a3
d88e7ac81b
34c2f6f97c
84d669d42b

Reviewed By: bigfootjon

fbshipit-source-id: 0023ba86bd62c454b2d182f9fe096952d7583187
2021-01-14 17:47:35 -08:00
Niles Rogoff
a169dcd98f Migrate bistro to getdeps
Summary:
This took a lot of cmake fuckery. I am guessing it will break the current travis-ci.org based build, since it no longer downloads gflags.

As I put this diff up, mvfst (a dependency of quic (a dependency of proxygen)) is not building right now due to another diff - a fix is in progress but isn't landed yet. I applied the fix locally for the test plan, but didn't include it in the diff.

Reviewed By: snarkmaster

Differential Revision: D25651851

fbshipit-source-id: b4f15ac7fa5293123710fe367c20d355c0970c42
2021-01-14 17:15:57 -08:00
svcscm
c7c4a403b7 Updating submodules
Summary:
GitHub commits:

cf70390ee8
15d23302ef

Reviewed By: bigfootjon

fbshipit-source-id: b945d4c4c68f38d766d24ff5b5e7b467e39d5352
2021-01-14 17:15:57 -08:00
svcscm
b01ff70406 Updating submodules
Summary:
GitHub commits:

0127b2b663
c3d99c1f1e
3d7d38e3c5
ec766bd220
2c54faaeeb
35db8705cd
eae21fcf04

Reviewed By: bigfootjon

fbshipit-source-id: d18137c400c55f52aa4701c2769c84bf4496531c
2021-01-14 15:19:14 -08:00
Stanislau Hlebik
f4ba9ed498 mononoke: maybe override SessionClass for batch_derive()
Summary:
override_ctx() sets different SessionClass while data is derived. This should
reduce the number of entries we write to blobstore sync queue. See previous
diff for more motivation.

This diff uses override_ctx() for batch_derive() method

Reviewed By: krallin

Differential Revision: D25910465

fbshipit-source-id: b8a3e729c059cad5716b1b09bd2f1cc618273627
2021-01-14 13:02:43 -08:00
Stanislau Hlebik
04f439b2f2 mononoke: make sure we initialize tunables in derived_data_tailer
Summary:
Previously we weren't initializing tunables at all in derived_data_tailer and
probably in lots of other binaries as well.

This is unfortunate, since derived_data_tailer runs for a long time and it
would be good to be able to control its behaviour.

Let's fix it by using init_mononoke() function.

Reviewed By: ikostia

Differential Revision: D25912156

fbshipit-source-id: eabd1c56120d087a169746077c8a7d36855c2b84
2021-01-14 13:02:43 -08:00
Stanislau Hlebik
fca761e153 mononoke: maybe override SessionClass while deriving data
Summary:
We had issues with mononoke writing too much blobstore sync queue entries while
deriving data for large commits. We've contemplated a few solutions, and
decided to give this one a go.

This approach forces derive data to use Background SessionClass which has an
effect of not writing data to blobstore sync queue if the write to blobstore
was successful (it still writes data to the queue otherwise). This should
reduce the number of entries we write to the blobstore sync queue
significantly. The downside is that writes might get a bit slower - our
assumption is that this slowdown is acceptable. If that's not the case we can
always disable this option.

This diff overrides SessionClass for normal ::derive() method. However there's
also batch_derive() - this one will be addressed in the next diff.

One thing to note - we still write derived data mapping to blobstore sync queue. That should be find as we have a constant number of writes per commits.

Reviewed By: krallin

Differential Revision: D25910464

fbshipit-source-id: 4113d00bc0efe560fd14a5d4319b743d0a100dfa
2021-01-14 13:02:42 -08:00
Stanislau Hlebik
d71e5178f7 mononoke: allow overriding session class
Summary:
We ran into issues when we write too much data to our blobstore sync queue. The
idea we want to try is to prefer to not write to the queue if puts were
successful.

In the next diff we'll start overriding session class when we derive data.
This diff makes it possible to do so.

Reviewed By: krallin

Differential Revision: D25910463

fbshipit-source-id: 2ead5291acbce4014fbb833cac1dc53a6eb61b13
2021-01-14 13:02:42 -08:00
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