Commit Graph

66365 Commits

Author SHA1 Message Date
Mateusz Kwapich
ae57ff3ccc make writing state optional in create_merge_commits
Summary:
The merge commit in case of change_target_sync_config won't be representing any
consistent state of the target so we don't want to write the remapping state
file there.

Reviewed By: StanislavGlebik

Differential Revision: D29515476

fbshipit-source-id: b0703be1127af6582785510fde51ff8501fb4f17
2021-07-06 08:32:48 -07:00
Mateusz Kwapich
15f3eadc49 make create_move_commits take just sources
Summary:
in case of change_target_sync_config we'll be creating move commits only for subset
of sources to let's change the function singature to so it's possible to
specify such subset.

Reviewed By: StanislavGlebik

Differential Revision: D29515475

fbshipit-source-id: 31002ec56dad872948bcbc79b0ed5fdb794e1f10
2021-07-06 08:32:48 -07:00
Mateusz Kwapich
85f31f3f85 move reusable functions to common
Summary:
The `change_target_config` methods responsibilities have a huge intersection
with `add_target_config`: the change method needs to know how to merge-in new
sources into the target and the whole "create move commits, then create merge
commits" flow can be reused.

Reviewed By: StanislavGlebik

Differential Revision: D29515301

fbshipit-source-id: c15f95875cbcbf5aad00e5047f6a8ffb55c4da31
2021-07-06 08:32:48 -07:00
svcscm svcscm
de07c13391 Updating submodules
Summary:
GitHub commits:

eac6011ae2

Reviewed By: bigfootjon

fbshipit-source-id: 887a0fb4ae4d3f71cdbdb3ef0cb0fbf7d52a4403
2021-07-06 08:23:17 -07:00
svcscm svcscm
6822047a1b Updating submodules
Summary:
GitHub commits:

27b932eb6d
18235c538b
77ff3bb3d2
0243bf8e58

Reviewed By: bigfootjon

fbshipit-source-id: 728bfcd9739635ae50e4a2a9b5867f79aa8a37b8
2021-07-06 00:38:00 -07:00
svcscm svcscm
88a40d30aa Updating submodules
Summary:
GitHub commits:

a2b4cc12ca

Reviewed By: bigfootjon

fbshipit-source-id: 1c67ebdf9e42fa1ac5b3880c76ad4753870fa789
2021-07-06 00:04:28 -07:00
svcscm svcscm
17b27fa89a Updating submodules
Summary:
GitHub commits:

919ccfb918
fc5319b5ff
0ac9cc64f8
303b872ae3

Reviewed By: bigfootjon

fbshipit-source-id: 1af638816f948baa8a6c71bc2a78654179b1ace2
2021-07-05 15:51:01 -07:00
svcscm svcscm
ce3b24851e Updating submodules
Summary:
GitHub commits:

c30c7c1bf2

Reviewed By: bigfootjon

fbshipit-source-id: 5b05bfd1e2321f45816b2b0eb74b4c09003ad4c3
2021-07-05 15:20:14 -07:00
Thomas Orozco
19769b7cb3 commitcloud: only check local nodes in _checkomissions
Summary:
With segmented changelog, this `if head not in repo` check goes and queries
the server to know if this exists. That's slow:

https://fb.workplace.com/groups/corehg/permalink/880425025886062/

This should hopefully fix it.

Reviewed By: quark-zju

Differential Revision: D29550877

fbshipit-source-id: f874fea3f42e1bde0acd4146bcfede4854b585f1
2021-07-05 14:38:33 -07:00
Aida Getoeva
498416a53c mononoke/blobstore: single lookup for is_present multiplex
Summary:
Currently `is_present` makes a blobstores lookup and in case it couldn't determine whether the key exists or not, it checks the sync-queue (in case the key was written recently) and then might check the multiplex stores again, then fails if still unsure. This brings unnecessary complications and makes the multiplex blobstore less reliable.
More details in: https://fb.quip.com/wOCeAhGx6Oa1

This diff allows us to get rid of the queue and second store lookups and move the decision-making to the callers. The new logic is under the tunable for the safer rollout.

*This diff is safe to land.*

Reviewed By: StanislavGlebik

Differential Revision: D29428268

fbshipit-source-id: 9fc286ed4290defe16d58b2b9983e3baaf1a3fe4
2021-07-05 11:13:18 -07:00
Harvey Hunt
fcaa5c72d6 mononoke: Implement loadshedding checks
Summary:
Now that Mononoke uses the `rate_limiting` library we can shed load if
a server is overloaded. Add load shedding checks to the entry points for
wireproto and EdenAPI HTTP traffic.

At the time of writing, there aren't any load shedding limits configure so this
change won't have any effect.

Differential Revision: D29396504

fbshipit-source-id: c90cc40fc2609bdae1a267be3a1aecfe7fd33b7b
2021-07-05 10:18:52 -07:00
Harvey Hunt
14ba455e60 mononoke: Use new rate limiting crate
Summary:
Update Mononoke server to use the new `rate_limiting` crate. This diff
also removes the old rate limiting library.

Differential Revision: D29396507

fbshipit-source-id: 05adb9322705b771a739c8bcaf2816c95218a42d
2021-07-05 10:18:51 -07:00
Harvey Hunt
a92eae78ae mononoke: lfs: Use new load shedding config
Summary:
Replace the LFS server's load shedding logic with that provided by the
`rate_limiting` crate.

Differential Revision: D29396503

fbshipit-source-id: a71812a55b9c9f111ee2861dc1b131ad20ca82d2
2021-07-05 10:18:51 -07:00
Harvey Hunt
7b40d3af0d mononoke: Add new rate limiting library
Summary:
Add a new rate limiting library that also supports load shedding when
an individual server is overloaded. This library provides a few benefits:

- The code can be shared between the LFS server and Mononoke server.
- The library supports more complex expressions of which clients to apply a
  rate limit to (e.g. 10% of sandcastle and mactest machines).
- The rate limiting `Target` can be expanded in the future as the client
  provides more information (e.g. client region).
- Mononoke server will be able to loadshed if an individual host is overloaded,
  as we can currently do with the LFS server.

I've added this library as a separate crate rather than rewriting
`load_limiter` to make it easier to review. The next diff will make use of the
new library and remove the old one.

Reviewed By: StanislavGlebik

Differential Revision: D29396509

fbshipit-source-id: 2fbc04e266b18392062e6f952075efd5e24e89ba
2021-07-05 10:18:51 -07:00
Aida Getoeva
8cf1889499 mononoke/blobstore: new is_present semantics via enum
Summary:
This diff introduces new `is_present` semantics that will allow to move the decision logic on the complex multiplex `is_present` result from the multiplex to the callers.

In the current API `is_present` call returns `Result<bool>` and in case it couldn't determine whether the key exists or not, it checks the sync-queue in case the key was written recently and then might check the multiplex stores again, then fails if still unsure. This brings unnecessary complications and makes the multiplex blobstore less reliable.
More details in: https://fb.quip.com/wOCeAhGx6Oa1

This change allows us to get rid of the queue and second store lookups and move the decision-making to the callers.

*This diff shouldn't change the behaviour, but to replace bool value with an enum and add the conversions where needed.*

Reviewed By: StanislavGlebik

Differential Revision: D29377462

fbshipit-source-id: 4b70f772d2ed70d9fffda015ba06c3f16bf1475d
2021-07-05 09:17:29 -07:00
Aida Getoeva
fb5c2ad210 mononoke/blobstore: add multiplex is_present test
Summary: This diff adds a new unit-test for multiplex `is_present`.

Reviewed By: StanislavGlebik

Differential Revision: D29488020

fbshipit-source-id: c7b167c19b4c371be9d3be03be3351590af77040
2021-07-05 09:17:29 -07:00
Harvey Hunt
5487586135 mononoke: Don't use rate limiting prefix from config
Summary:
The rate limits for commits support the ability to apply a specific
prefix to the load limiting category. However, we haven't used this
functionality. Remove it to make subsequent work on the rate limiting logic
easier to implement.

Reviewed By: StanislavGlebik

Differential Revision: D29396506

fbshipit-source-id: ac518ccd74f6fac49ab85f87f1500787b5db955e
2021-07-05 07:09:53 -07:00
Harvey Hunt
cd7cdb334e mononoke: lfs: Remove jitter and sleep
Summary:
These config options are now unused as the client performs its own
jitter and exponential backoff. These values have been 0 in config for a while
now, so removing the code for them should have no behavioural impact.

Reviewed By: StanislavGlebik

Differential Revision: D29396508

fbshipit-source-id: 0a9d7efdd37516bee85ff9a34bfe9aa286ce4c0e
2021-07-05 07:09:53 -07:00
Harvey Hunt
fcaefcaeb3 rust: ratelim: Update to new futures
Summary: Update the ratelim crate to use the latest version of Rust's futures.

Reviewed By: StanislavGlebik

Differential Revision: D29061726

fbshipit-source-id: e7514d5802ad13cfe7e96f67fe17d208209967eb
2021-07-05 07:09:53 -07:00
svcscm svcscm
76c9ca3a89 Updating submodules
Summary:
GitHub commits:

4fe5aaae7d
0551715c5d
51ff2afa88
b9248aede3

Reviewed By: yns88

fbshipit-source-id: f07e32f6ca72d712ed25fe336891d6b01268f857
2021-07-04 08:55:27 -07:00
svcscm svcscm
baa2a14f67 Updating submodules
Summary:
GitHub commits:

124ed1e692

Reviewed By: yns88

fbshipit-source-id: 975526015e1f191a211ee49e535be98dfec5b8bf
2021-07-04 08:21:56 -07:00
svcscm svcscm
6fc58eab37 Updating submodules
Summary:
GitHub commits:

0df78e8eb6
3cf1453b66
8e88a152a3
fe52b97987

Reviewed By: yns88

fbshipit-source-id: c361d709bf5b626234fd5ff4bd7ac6a0639e7876
2021-07-03 14:23:43 -07:00
svcscm svcscm
13cbac26da Updating submodules
Summary:
GitHub commits:

73e3445113

Reviewed By: yns88

fbshipit-source-id: 05d23dde942dc5e9c64ce2338cf46e05780e8ccf
2021-07-03 13:44:28 -07:00
svcscm svcscm
99051f1610 Updating submodules
Summary:
GitHub commits:

cfd652be70
2e3eab0896
d1a9643cdd
cbdfce7985

Reviewed By: yns88

fbshipit-source-id: 2accf2f6f7119df61f017dc34d029f9ffeb05dcc
2021-07-02 14:15:37 -07:00
svcscm svcscm
e5aa198a9f Updating submodules
Summary:
GitHub commits:

b73ada20d4
49149fa666
1fd5c61497
d5a1e6f149
34f97fdc26

Reviewed By: yns88

fbshipit-source-id: 77c79710b1a6110a15f54fa03aafb58ad0dd7ea7
2021-07-02 13:48:58 -07:00
svcscm svcscm
12bd2b21b6 Updating submodules
Summary:
GitHub commits:

1262119e16

Reviewed By: yns88

fbshipit-source-id: 13e0b2636b30c76d548065f27c47ad247d049786
2021-07-02 13:19:57 -07:00
svcscm svcscm
7fb5ec5d37 Updating submodules
Summary:
GitHub commits:

b4526333f0
da42ec328a
df08d77dd7
0e1b09eb8d

Reviewed By: yns88

fbshipit-source-id: 159c5b54c51fd26fbc9e3a378da564b2ea426518
2021-07-02 11:58:57 -07:00
svcscm svcscm
af23b5ab3a Updating submodules
Summary:
GitHub commits:

dadce0ae48

Reviewed By: yns88

fbshipit-source-id: a4917e616555db9e76b55aa307bd61870f228ad5
2021-07-02 11:22:47 -07:00
svcscm svcscm
608564c5d7 Updating submodules
Summary:
GitHub commits:

dc430275e0
1b52cc2785
46274b74af
e70bc8c7ca

Reviewed By: yns88

fbshipit-source-id: 59b1459c003ddcadfcfdf613eb3aedc9b095dffd
2021-07-01 23:35:44 -07:00
svcscm svcscm
0091e4d44d Updating submodules
Summary:
GitHub commits:

e9f56a1ec9

Reviewed By: yns88

fbshipit-source-id: 5ec71c5c2af1ffa57a3aef46e55b63940957bd10
2021-07-01 23:01:30 -07:00
svcscm svcscm
160d0b175d Updating submodules
Summary:
GitHub commits:

a2a32cb531
d0be43e837
b91f2c5fd1
c76778e2bd
7e763798c6
667db618ac
5dd53e6e2c

Reviewed By: yns88

fbshipit-source-id: 0a00da2000128eb9a2c41a673e566fb74c4f60fa
2021-07-01 20:23:19 -07:00
svcscm svcscm
575e1e6153 Updating submodules
Summary:
GitHub commits:

a63f8a01f6
3f3d81380a
eccac3b1cd
2d62e7c036
f8f74efd0f

Reviewed By: yns88

fbshipit-source-id: 622ce0a0e18414f0c4be6b451c2271c6a8980d9a
2021-07-01 19:33:53 -07:00
svcscm svcscm
acaba0e2f6 Updating submodules
Summary:
GitHub commits:

aea62a2d7d
b123925cf5
2764d7b61c
b20737709f
22f79e6815
bcaddcbda0

Reviewed By: yns88

fbshipit-source-id: 06399d0685a26f1f6afddc1f29df3bb4b8e8c5ee
2021-07-01 19:02:00 -07:00
svcscm svcscm
1b24265f07 Updating submodules
Summary:
GitHub commits:

4c9c18e65a
64601e0ad6
d31c8641dc
168a35060a
f2196ddbca
e3a16c8616

Reviewed By: yns88

fbshipit-source-id: 1c0777bb38a2d055e0452167b0ded6ae8c44bc8e
2021-07-01 18:37:00 -07:00
Jun Wu
80714c8647 lib: remove most rustc warnings
Summary: The warnings make build output less clean.

Reviewed By: kulshrax

Differential Revision: D29526580

fbshipit-source-id: eb4069c2edd111bb04b8754e7051035b8aa8a508
2021-07-01 18:08:55 -07:00
Andrey Chursin
0e56fa056f cpython_ext: add pycell::import
Summary: The use case here is that we can export rust struct into python object, manipulate python object and then convert it back into rust struct

Reviewed By: quark-zju

Differential Revision: D29525281

fbshipit-source-id: 393c8a430a76c720c155432d732085892d56521a
2021-07-01 17:32:13 -07:00
svcscm svcscm
31aaa7c8af Updating submodules
Summary:
GitHub commits:

2d5fd57b15
e97fb0e6bd

Reviewed By: yns88

fbshipit-source-id: c786b1877a1c1e520bcf46879477275faa4e595a
2021-07-01 17:14:39 -07:00
Andrey Chursin
3360815092 cpython-ext: add method to export pycell into inspectable python object
Reviewed By: quark-zju

Differential Revision: D29521113

fbshipit-source-id: ff5c0be50149262d555105e495633847059a78a6
2021-07-01 16:11:48 -07:00
Andrey Chursin
6b649ab8e2 cpython-ext: conditionally derive traits for Serde
Summary:
Previously Serde<T> required T to implement bunch of traits like Eq, Clone etc

This diff lifts this restriction and only implements those traits for Serde if T implements them, but does not require them

Reviewed By: quark-zju

Differential Revision: D29521112

fbshipit-source-id: e9387b08ab129fc1f2450f6c88fa7fe0f6451349
2021-07-01 16:11:48 -07:00
Carolyn Busch
4046bbcae5 setdiscovery: add edenapi http lookup
Summary: Use the bookmarks and commitknown edenapi methods in the setdiscovery process.

Reviewed By: kulshrax

Differential Revision: D29305605

fbshipit-source-id: efbac229e37870f95e0c04c5db275e6e4c8239ac
2021-07-01 14:10:34 -07:00
Carolyn Busch
8e6b4b6678 eagerpeer: fix push_key bookmark update
Summary: Fix two bugs in the eagerpeer pushkey implemention for the case where the bookmark has an existing value. The existing bookmark is already in hex form and errors on conversion. The new bookmark should be set when the new bookmark doesn't match the existing bookmark.

Reviewed By: quark-zju

Differential Revision: D29305606

fbshipit-source-id: 79ec6432d2fe7709f51f5cc508a39238ce446e23
2021-07-01 14:10:34 -07:00
svcscm svcscm
8a3c8842b3 Updating submodules
Summary:
GitHub commits:

efc426d6cd
910d043666
7281ec8c85
14f5d05449

Reviewed By: yns88

fbshipit-source-id: 66646260c910c51106471b4d4a0b274a849fc181
2021-07-01 13:36:10 -07:00
svcscm svcscm
9263118a40 Updating submodules
Summary:
GitHub commits:

96899e6032
6c2a756777
52d52b9f53
051cdf8eab
41d32152ce
c4cabd6e2d
f05452db74
74619b17d8

Reviewed By: yns88

fbshipit-source-id: 7679f3e304965e6142c28ce08d7080e6c158cb41
2021-07-01 12:52:18 -07:00
Andrey Chursin
682ac6f93a pull: track pull metrics
Reviewed By: DurhamG

Differential Revision: D29505072

fbshipit-source-id: 9af370b8be6212b7d41880908a1f788291826367
2021-07-01 12:11:11 -07:00
Nitzan Raz
88fd2997d6 Mercurial: Added "commitphab" template
Summary:
Mercurial is already pulling the remote commit for the "local changes" indicator in `hg ssl`.
I'd like to more easily access this remote commit from CLI.
After this change I can run something like `hg ssl -T '{phabcommit}` to get the remote commit and diff locally against it.

I'm very open to changes about the naming / anything else

Reviewed By: DurhamG

Differential Revision: D29482374

fbshipit-source-id: b01fd0186a1f3a999f388edf140b089c89be7bf6
2021-07-01 12:00:20 -07:00
svcscm svcscm
4d4b5d4eec Updating submodules
Summary:
GitHub commits:

cf62fecd39
0c623dc639
18117870f1
2df897e9fa
6c6b99ad8e
61083e357f
20e43d891e
0d93607d62
1744033627
169a3ef36d

Reviewed By: yns88

fbshipit-source-id: 8341758180f982df7c59eb12aba956a696709e0f
2021-07-01 10:55:40 -07:00
Andrey Chursin
95d16b05d5 pull: update fastpath message
Reviewed By: quark-zju

Differential Revision: D29502091

fbshipit-source-id: 58b989ea773e38398e453a7a319acb13f415237f
2021-07-01 10:49:01 -07:00
Andrey Chursin
7ad57c10a5 bindings: use pycell instead of mincode for pull data
Reviewed By: quark-zju

Differential Revision: D29474445

fbshipit-source-id: dd6536bdbac6e5690c918a222bf3823537ceffcc
2021-07-01 10:49:01 -07:00
Andrey Chursin
b3187fa74a dag-types: introduce CloneData::convert_vertex
Reviewed By: quark-zju

Differential Revision: D29474443

fbshipit-source-id: 06ee410d11d5be3d7655f64dc1aa999efaa938c6
2021-07-01 10:49:01 -07:00
Andrey Chursin
910e457673 cpython_ext: introduce pycell
Summary:
We currently encode/decode data when passing it between pull_fast_forward_master and importpulldata and some other cases
pycell is alternative to that, allowing to just transfer pointer, instead of encoding data

Reviewed By: quark-zju

Differential Revision: D29474444

fbshipit-source-id: aabbbb670fde08645031c199afbdeab5cc9093d8
2021-07-01 10:49:01 -07:00