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
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
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
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
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
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
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
Summary:
Replace the LFS server's load shedding logic with that provided by the
`rate_limiting` crate.
Differential Revision: D29396503
fbshipit-source-id: a71812a55b9c9f111ee2861dc1b131ad20ca82d2
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
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
Summary: This diff adds a new unit-test for multiplex `is_present`.
Reviewed By: StanislavGlebik
Differential Revision: D29488020
fbshipit-source-id: c7b167c19b4c371be9d3be03be3351590af77040
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
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
Summary: Update the ratelim crate to use the latest version of Rust's futures.
Reviewed By: StanislavGlebik
Differential Revision: D29061726
fbshipit-source-id: e7514d5802ad13cfe7e96f67fe17d208209967eb
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
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
Summary: Use the bookmarks and commitknown edenapi methods in the setdiscovery process.
Reviewed By: kulshrax
Differential Revision: D29305605
fbshipit-source-id: efbac229e37870f95e0c04c5db275e6e4c8239ac
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
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
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