Commit Graph

58551 Commits

Author SHA1 Message Date
svcscm
76dde2e627 Updating submodules
Summary:
GitHub commits:

b6e5b6473c
56bdd8b3aa
721ac3e283
a455549a4d
09754aa4d6
6530836c78

Reviewed By: zpao

fbshipit-source-id: dfbdd7c1746561aaa19f7d11c188597f24d6321e
2020-06-16 12:48:45 -07:00
Mateusz Kwapich
406bf6e353 migrate reachabilityindex::common module to async/await syntax
Summary: this is the last diff to complete the `reachabilityindex` module migration

Reviewed By: farnz

Differential Revision: D22049853

fbshipit-source-id: d8510f2d1b1c12a1ba903c2afda37096aadd8347
2020-06-16 11:10:21 -07:00
Mark Thomas
080f455000 mutationstore: insert mutation info in a stable order
Summary:
When inserting multiple rows using `INSERT IGNORE`, it's possible to hit
deadlocks if two competing transactions insert the same rows in a different
order.

This can be triggered in the mutation store if two clients are pushing
overlapping sets of commits, and the arbitrary changeset order from the
`HashSet` gives the commits in a different order.  For example the first
transaction might be inserting "A, B, C", be holding the lock on row A, and be
waiting for the lock on row C, meanwhile another transaction is inserting "C,
D, A", holding the lock on row C, and waiting for the lock on row A.

To avoid these deadlocks, always insert the mutation changesets in a stable
order (sorted by changeset hash or successor hash).

Reviewed By: krallin

Differential Revision: D22067338

fbshipit-source-id: aa54c8a9c0cac4e4ae35855b44e759f8b6cb4f59
2020-06-16 10:33:41 -07:00
Mark Thomas
d9702a314a sampling: log repo root and repo shared root
Summary:
Add logging of the repo root and repo shared root to the sampling extension.

Reduce the number of different strings that are logged by replacing any path
component that equals the user's username (e.g. their home directory) with
`$USER`.

Reviewed By: farnz

Differential Revision: D22066053

fbshipit-source-id: 39221e5182b3d4df51afa386497003e637a50b13
2020-06-16 10:25:03 -07:00
svcscm
318b6a9a64 Updating submodules
Summary:
GitHub commits:

d11ad471ff
5baef31d02
0e92511dc6

Reviewed By: zpao

fbshipit-source-id: de83b1e25d087d73ccfecd4ff1bb080cc9280b6a
2020-06-16 05:35:40 -07:00
Alex Hornby
0134614228 mononoke: async blobstore-test
Summary:
async the blobstore test functions, in preparation for adding test coverage for BlobstoreWithLink::link

The boxable test was duplicating the simple roundtrip test which seemed unnecessary, now it just checks that we can Box the blobstore type.

Reviewed By: krallin

Differential Revision: D21974471

fbshipit-source-id: a3cd71a7503a3a670b3c6223812a2e870a20a16e
2020-06-16 04:11:44 -07:00
Alex Hornby
95db00c3b8 mononoke: update memblob imports to futures_old
Summary: update memblob imports to futures_old in preparation for using new futures to implement BlobstoreWithLink

Reviewed By: krallin

Differential Revision: D21973642

fbshipit-source-id: dea4a686db41a0d618395c4dc411603f922a9e22
2020-06-16 04:11:44 -07:00
Alex Hornby
3461170052 mononoke: update fileblob imports to futures_old
Summary: Update imports in preparation for using new futures for the BlobstoreWithLink mixin trait

Reviewed By: StanislavGlebik

Differential Revision: D21973587

fbshipit-source-id: 094aa82abc21848d43f50d6d169087e19339ba04
2020-06-16 04:11:44 -07:00
Alex Hornby
2b115684af mononoke: switch blobstore imports to use futures_old naming
Summary: Switch blobstore imports to use futures_old naming in preparation for using new futures in BlobstoreWithLink (and later BlobstoreWithEnumeration) traits.

Reviewed By: krallin

Differential Revision: D21972842

fbshipit-source-id: 6022c98e7b7254f7c7beb46dc1c7f83609810853
2020-06-16 04:11:44 -07:00
Alex Hornby
6658b17fb6 mononoke: add packblob to blobstore_factory
Summary: mononoke: add packblob to blobstore_factory

Reviewed By: farnz

Differential Revision: D21924406

fbshipit-source-id: d42702b11bdc0b187467869a7959f68022c60ab2
2020-06-16 04:11:43 -07:00
Alex Hornby
8aafcf3524 mononoke: add basic packblob blobstore
Summary: Add basic packblob store which wraps blobs in the thrift StorageEnvelope type on put() and unwraps them on get()

Reviewed By: farnz

Differential Revision: D21924405

fbshipit-source-id: 81eccf5da6b5b50bdb9aae13622301a20dca0eac
2020-06-16 04:11:43 -07:00
Alex Hornby
f581b973f0 mononoke: packblob: thrift definitions and README
Summary:
Thift definitions for a new blobstore layer known as packblob, which is an enabling part of compression at the mononoke blobstore layer.  Its storage formats will support raw data, individual blob compression and blob delta compression.

The included README.md has more detail on the expected use of these types.

Reviewed By: farnz

Differential Revision: D21761723

fbshipit-source-id: a277800f4b4aed5972c4a5bb277e984ff12660f8
2020-06-16 04:11:43 -07:00
Stanislau Hlebik
e7e21f9c30 mononoke: migrate megarepolib to new futures
Summary:
I'm going to change it in the next diffs, so let's migrate them to new futures
first.

Reviewed By: krallin

Differential Revision: D22065216

fbshipit-source-id: b06fcac518d684f40b1d19fcef9118ca51236873
2020-06-16 03:32:50 -07:00
Simon Farnsworth
262ce6f362 Use per-shard MyAdmin measured delays
Summary: Without this, the most lagged shard will slow down all shards; with this, a single lagging shard doesn't slow down other shards.

Reviewed By: ahornby

Differential Revision: D22018264

fbshipit-source-id: c23f25ea1d0b0b6891d2a6f76dfed467101d2f4d
2020-06-16 02:56:48 -07:00
Simon Farnsworth
8a01732caa Move delay into the stores
Summary: I'll want the delay operation to respect shard_id - move it into the stores. While here, do some refactoring that will reduce the size of the next diff.

Reviewed By: ahornby

Differential Revision: D22018317

fbshipit-source-id: d2333dfc6749b2a13bc8a67bfa953ed25cedf847
2020-06-16 02:56:48 -07:00
svcscm
476f569150 Updating submodules
Summary:
GitHub commits:

7f2aa921d3
67be506a22
9975723ae6
792d3247e1
3e1c1afd22
140c160ccf
8814ba45f6
fef00d2f48
f91a8a06b0
b19dd26327
383ea2e754

Reviewed By: zpao

fbshipit-source-id: 2385b7b9e2e7a9236613969a76f236661b5f8da9
2020-06-15 21:53:23 -07:00
Chad Austin
c13386ead4 fix test
Summary:
test_no_units_are_active was failing on CentOS 8. Presumably systemd
has some new default services. I believe genevievehelsel is planning on
replacing all of this code, so, rather than understand the failure,
just ignore the additional service names.

Reviewed By: genevievehelsel

Differential Revision: D22055992

fbshipit-source-id: b6f313350d0e1b107fe6ea3d7ed7f5b4eb025ef3
2020-06-15 18:37:01 -07:00
Xavier Deguillard
adcd787f1b remotefilelog: do not import the builtins module
Summary:
From a simple `hg trace log -r .`, it appears that importing the module takes
16ms, which dominates the time it takes to load the treemanifest extension.
Since the module isn't necessary, don't import it.

Reviewed By: farnz

Differential Revision: D22048075

fbshipit-source-id: ccaf2d53eb006faa36d97df452b0db10f4983c23
2020-06-15 17:30:44 -07:00
Jeremy Fitzhardinge
c530d32056 rust: clean up some warnings
Summary: Prep for 1.44 but also general cleanups.

Reviewed By: dtolnay

Differential Revision: D22024428

fbshipit-source-id: 8e1d39a1e78289129b38554674d3dbf80681f4c3
2020-06-15 16:50:40 -07:00
Chad Austin
46a89778ea enable asynchronous integration tests
Summary:
Python 3.8 provides the (poorly named)
unittest.IsolatedAsyncioTestCase base class that gives each test an
asyncio event loop and runs it. This allows us to write async
integration tests, required to use modern Thrift Python.

Reviewed By: genevievehelsel

Differential Revision: D21955584

fbshipit-source-id: 8366dc7c72b31e1667e72fe1e359587b74e2c614
2020-06-15 15:53:50 -07:00
svcscm
6193eeb1f3 Updating submodules
Summary:
GitHub commits:

f5c9b4a2bb
aace4022cf
0c4401f0d0
8d4e8eded7
5e3bff33cf
fdff56cdcc
38f55c540f
9bfd46d0d8
55e75f5c23
98b6d677ae
ae09edbef5
53e72c8e7e
45c7608434
55c4df9694
4ffc36b6de

Reviewed By: zpao

fbshipit-source-id: 7c18201fd4b799231afdaac635ce47c2c7073836
2020-06-15 15:42:56 -07:00
Xavier Deguillard
42fb95adc2 integration: write files to the repo in binary mode
Summary:
In text mode, Python will use '\r\n' as line endings instead of '\n' on
Windows. This has the negative side effect of making some tests fails due to
the file content not being exactly what is being written.

Reviewed By: fanzeyi

Differential Revision: D21944456

fbshipit-source-id: f7f271e2ef9e2f21bd78c76233e644ce411b63df
2020-06-15 15:10:20 -07:00
Carolyn Busch
89f238b8dd Replace whitelist/blacklist term
Summary: Replaces usages of whitelist/blacklist with include/exclude/allow. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/

Reviewed By: farnz

Differential Revision: D22039299

fbshipit-source-id: d5b4cdeca681e1f4c992f7ef0b9f772b2ae1abd3
2020-06-15 15:01:19 -07:00
Jun Wu
6584ad18f6 run-tests: add a way to record $TESTTMP changes in source control
Summary:
Add a `--record` flag, which uses `git` to track changes in `$TESTTMP`.
I use it to track changes with C revlog vs the Rust revlog.

Reviewed By: farnz

Differential Revision: D22007501

fbshipit-source-id: a8027aa4b2b3b97c3cf5f642434451826fcbded9
2020-06-15 14:41:52 -07:00
Mark Thomas
973d9806e7 commitcloud: use correct field in interactive smartlog history
Summary:
Interactive smartlog history attempts to access `sltimestamp` as a field of
`slinfo`.  The field is actually called `timestamp`.

Reviewed By: quark-zju

Differential Revision: D22042316

fbshipit-source-id: 7c1d53dfc1c8d661a248d8412f7d780c83723721
2020-06-15 14:06:30 -07:00
Arun Kulshreshtha
977c3c73e3 edenapi_server: rename the subtree endpoint to complete_trees
Summary:
Rename the `subtree` endpoint on the EdenAPI server to `complete_trees` to better express what it does (namely, fetching complete trees, in contrast to the lighter weight `/trees` endpoint that serves individual tree nodes). This endpoint is not used by anything yet, so there isn't much risk in renaming it at this stage.

In addition to renaming the endpoint, the relevant request struct has been renamed to `CompleteTreeRequest` to better evoke its purpose, and the relevant client and test code has been updated accordingly. Notably, now that the API server is gone, we can remove the usage of this type from Mononoke's `hgproto` crate, thereby cleaning up our dependency graph a bit.

Reviewed By: krallin

Differential Revision: D22033356

fbshipit-source-id: 87bf6afbeb5e0054896a39577bf701f67a3edfec
2020-06-15 13:40:44 -07:00
Carolyn Busch
2c7f30d0c4 configparser: replace whitelist/blacklist term
Summary: Replace usages of whitelist/blacklist with include/exclude/filter/allow. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/

Reviewed By: kulshrax

Differential Revision: D22039298

fbshipit-source-id: 255c7389ee5ce5e54bbccdfb05ffa4cafc6958e5
2020-06-15 12:47:08 -07:00
Carolyn Busch
990926cbc6 edenscm/mercurial: Replace whitelist/blacklist term
Summary: Replaces usages of whitelist/blacklist with include/exclude/allowed. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/

Reviewed By: kulshrax

Differential Revision: D22039297

fbshipit-source-id: ab6e55889e6cf42aed35c856475b2ff92f4cb802
2020-06-15 12:47:08 -07:00
Paul Davis
e462d84681 Enable abort and continue use cases in zsh hg histedit autocompletion
Summary: Enable the most common autocomplete use cases in zsh hg histedit autocomplete

Reviewed By: fanzeyi

Differential Revision: D22032612

fbshipit-source-id: 1fd47d30564c51a010785d7d0553e3a5d16f163a
2020-06-15 12:16:53 -07:00
Ailin Zhang
41df657be1 update eden du backing repos printing
Summary:
This diff updated the `eden du` command. Instead of printing
```Reclaim space from the LFS cache directory by running:

hg -R /data/users/akushner/eden-repos/opsfiles gc

Reclaim space from the LFS cache directory by running:

hg -R /data/users/akushner/eden-repos/megarepo_test gc

Reclaim space from the LFS cache directory by running:

hg -R /data/users/akushner/eden-repos/instagram-server_test gc
```
We now print "Reclaim.." only once and put available commands together
```
LFS cache detected in backing repo. To reclaim space from the LFS cache directory, run:

hg -R /data/users/akushner/eden-repos/opsfiles gc
hg -R /data/users/akushner/eden-repos/megarepo_test gc
hg -R /data/users/akushner/eden-repos/instagram-server_test gc
```
and did the same for working copy under backing repositories.

Reviewed By: fanzeyi

Differential Revision: D22038555

fbshipit-source-id: c19869db6f91e90a0627b3bb4b4f7e95142ae198
2020-06-15 11:57:29 -07:00
Carolyn Busch
ca4bed9633 hgext: replace whitelist/blacklist term
Summary: Replaces usages of whitelist/blacklist with includelist/excludelist/incompatiblelist/. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/

Reviewed By: kulshrax

Differential Revision: D22039296

fbshipit-source-id: d4c1fd09e40d5ebeaab99515ed19aa5df6c2ecc4
2020-06-15 11:47:28 -07:00
Ailin Zhang
2c52eed9e4 update eden du summary printing
Summary: This diff fixed small problems in previous `eden du` summary printing and added a reminder of option `--clean` to users.

Reviewed By: fanzeyi

Differential Revision: D22038552

fbshipit-source-id: 7dbac858b74833e59d8d3f1c6fb1f5d8944935d0
2020-06-15 11:40:04 -07:00
Jun Wu
295047e02a tests: remove some rarely used tests
Summary:
Those tests show up as "skipped". I removed some rarely used ones:
- test-check-jshint: we seldom write javascript.
- test-check-shbang: a slow test that does not do much.
- test-chg: chg is being tested in other tests by default.
- test-docker-packaging: probalby already broken, we don't use docker.
- test-verify-repo-operations: a slow test that is too expensive to run with
  limited value.

Reviewed By: markbt

Differential Revision: D21989103

fbshipit-source-id: 8080ad68dc75b59f87336b94af38c8231f4f10f4
2020-06-15 11:36:07 -07:00
Viet Hung Nguyen
d622ecb06a mononoke/bonsai_git_mapping: add CoreContext to BonsaiGitMapping functions
Summary: Log sql accesses in bonsai_git_mapping: added (core: &CoreContext) arguments to BonsaiGitMapping trait functions. Increment counters in functions where we have sql requests (e.g SQLReadsReplica). Updated tests covering BonsaiGitMapping with mock context object.

Reviewed By: StanislavGlebik

Differential Revision: D22043831

fbshipit-source-id: d05b07e262a8b7494d2ae46d5660d1c0695619ae
2020-06-15 11:23:23 -07:00
Chad Austin
ab4cd318dd re-enable lz4 compression for rocksdb on macOS and Linux
Summary:
I think LZ4 was disabled accidentally in our rocksdb getdeps build in
D21319896. Enable it again on macOS and Linux, because otherwise this
breaks people with EdenFS mounts containing LZ4-compressed proxy
hashes.

Reviewed By: xavierd

Differential Revision: D21990356

fbshipit-source-id: b9166c2992ae51f09de3fa9a4f114143aa008f43
2020-06-15 10:36:55 -07:00
Mateusz Kwapich
0a915a26a8 fix the problem with updating skiplists after trimming
Summary:
After being trimmed down to store only a single edge the skiplist update
algoritm was working incorrectly. This diff introduces a way of fixing things
up.

Reviewed By: StanislavGlebik

Differential Revision: D21976995

fbshipit-source-id: 3bc4678011b332419d9f6f7b983a33fa066674bf
2020-06-15 09:58:15 -07:00
Arun Kulshreshtha
7d72408ade edenapi_server: return streaming responses
Summary: Make most of the handlers on the EdenAPI server return streaming responses.

Reviewed By: krallin

Differential Revision: D22014652

fbshipit-source-id: 177e540e1372e7dfcba73c594614f0225da3a10f
2020-06-15 09:11:09 -07:00
Mateusz Kwapich
33b5dd5c41 show problem with updating trimmed skiplists
Summary:
In production we trim skiplists to hold a single entry which causes
the update algorithm to behave incorrectly

Reviewed By: StanislavGlebik

Differential Revision: D21976996

fbshipit-source-id: 4946be11512ac9577bdd3320913fe092d513ecdd
2020-06-15 08:14:36 -07:00
Mateusz Kwapich
bc20c35b90 migrate ReachabilityIndex trait to async/await
Reviewed By: StanislavGlebik

Differential Revision: D21958617

fbshipit-source-id: 5acdfdc5e4dd9dc694a32bcf6441fdb4ca0f5776
2020-06-15 08:14:36 -07:00
Mateusz Kwapich
a6a77a1466 make LeastCommonAncestorsHint async
Reviewed By: StanislavGlebik

Differential Revision: D21958620

fbshipit-source-id: 597ed2069eb0b8f7668454548d4a347e51324024
2020-06-15 08:14:36 -07:00
Mateusz Kwapich
fe0ccc5b08 migrate fetch_skiplist_index to async/await syntax
Reviewed By: StanislavGlebik

Differential Revision: D21955570

fbshipit-source-id: 3d260520618af8c19d1cc3ffe20d73f3c676ed47
2020-06-15 08:14:36 -07:00
Mateusz Kwapich
0071d1803c migrate add_node to async/await syntax
Reviewed By: StanislavGlebik

Differential Revision: D21951752

fbshipit-source-id: 7de23875e51196018227729966701a4980a7c89a
2020-06-15 08:14:35 -07:00
Stanislau Hlebik
975ce02007 rust/thrift: add an option to stop processing requests if client disconnected, take 2
Summary:
Support for this was added in D20763778, however they were reverted later in
D21762641. Turned out that all cancelled requests were counting as still
"active" even though they were cancelled a long time ago. It accumulated over
time, and at some point (to be precise, at ~65K of "active" connections) thrift
server started to reject new connections.

The problem was that original diff D20763778 didn't delete ReplyState
structure, which had pointers to a few other C++ structures whose destructor
decremented the number of active connections. To be precise:
1) https://fburl.com/diffusion/qxsu4dqe - ReplyState is allocated here, and was
previously deallocated here - https://fburl.com/diffusion/9fj9ksgx
2) ReplyState has a pointer to ResponseChannelRequest
(https://fburl.com/diffusion/6au1duav), which is in our case is an instance of
Cpp2Request, whose destructor decrements the number of active requests
(https://fburl.com/diffusion/ylp2108m).

This diff actually does two things. It adds back the changes that were added in
D20763778, and also adds a fix that explicitly deletes ReplyState structure.
For convinience, you can see just the fix in D22017238.

Previously we were deleting ReplyState in send_reply function, however now
freeReplyState function should be explicitly called from the Rust code, which
should also fix a memory leak we had when `processor.call()` method returned an error
(https://fburl.com/diffusion/ymnwc3jx).

This is quite unfortunate that we have to do a manual actions to clean
up the memory - I'll try to improve it in the next diff.

Reviewed By: markbt

Differential Revision: D22018113

fbshipit-source-id: 2e9762bf7300129ad9e58e39fb93fca6f9505159
2020-06-15 07:17:12 -07:00
Mark Thomas
f80205bc96 repo_client: log infinitepush commits to scribe
Summary:
Add logging of infinitepush (draft) commits to a separate scribe category.

The logging will also include the username and hostname of the pusher.  Since
this code is shared with the public commits scribe logging, that logging will
also gain this information.

Reviewed By: farnz

Differential Revision: D21742656

fbshipit-source-id: bdbfd14db9e8aae190c634ac4bfff35b3f62bbe4
2020-06-15 06:32:55 -07:00
Alex Hornby
ea910afed0 mononoke: remove unused import
Summary: Found this wasn't used while looking at prefixblob usages

Reviewed By: farnz

Differential Revision: D22034647

fbshipit-source-id: a0d7dc02dbee9fdf685df464539323d4c200a818
2020-06-15 04:22:08 -07:00
Mateusz Kwapich
89341f08bb migrate process_frontier to async/await syntax
Summary: incremental step on the path to modernization of this module

Reviewed By: StanislavGlebik

Differential Revision: D21937310

fbshipit-source-id: 6ae5f9eb43355efee35705cce96736bfcb19c8ca
2020-06-15 02:55:35 -07:00
Mateusz Kwapich
fc05b8d667 migrate query_reachability internal implementation to async/await syntax
Summary:
NOTE: this diff doesn't change the public API of the trait - that's why we do
`compat()` and `boxify()`. This change will follow later in the stack.

Reviewed By: StanislavGlebik

Differential Revision: D21937308

fbshipit-source-id: 11bef4c5087a9ac06e209685d3281483b804c394
2020-06-15 02:55:35 -07:00
Mateusz Kwapich
592e696146 remove one of ancestry check implementations
Summary:
I'm not sure why but D14405696 added this `is_ancestor` method with a
duplicate ancestry check implementation which:
 * has different behaviour when `ancestor == descendant`
 * doesn't log to ODS

Let's just settle on using one implementation now.

Reviewed By: StanislavGlebik

Differential Revision: D21937312

fbshipit-source-id: 0f4e2390cb0b984f92cd4fe645d9313fa4bba70e
2020-06-15 02:55:35 -07:00
Mateusz Kwapich
a56afca442 migrate lazy_index_node to async/await syntax
Summary: incremental step on the path to modernization of this module

Reviewed By: StanislavGlebik

Differential Revision: D21937311

fbshipit-source-id: 9db84c7cb166084edfc5a0638c1c884964f9984c
2020-06-15 02:55:34 -07:00
Mateusz Kwapich
86d3e87b16 migrate find_nodes_to_index to async/await syntax
Summary: incremental step on the path to modernization of this module

Reviewed By: StanislavGlebik

Differential Revision: D21937309

fbshipit-source-id: 61b1b4302782cea35d3f65e6fe982f530293dd81
2020-06-15 02:55:34 -07:00