sapling/eden/mononoke/repo_client
Kostia Balytskyi de7fd72ed3 push_redirector: instantiate at request start
Summary:
The goal of the stack is to support hot reloading of `CommitSyncConfig`s everywhere: in `push_redirector`, `backsyncer`, `x-repo sync job` and so forth.

This diff in particular is a refactoring of how we instantiate the `PushRedirector` struct for the `unbundle` flow. Previously the struct would be instantiated when `RepoHandler` struct was built and would later be reused by `RepoClient`. Now we want to instantiate `PushRedirector` before we start processing the `unbundle` request, so that we can request the newest `CommitSyncConfig`. Note that this diff does not introduce the hot reload itself, it just lays the groundwork: instantiation of `PushRedirector` at request start.

To achieve this goal, `RepoClient` now contains a somewhat modified `PushRedirectorArgs` struct, whose goal is to own the unchanging stuff, needed to create a full `PushRedirector`.

Here are a few explicit non-goals for this hot reloading:
- the overall decision whether the repo is part of any `CommitSyncConfig` or not is still made at `RepoHandler` creation time. What this means is that if `CommitSyncConfig` is changed to have another small repo and Mononoke servers happens to know about that repo, it would not automatically pick up the fact that the repo should be a part of `CommitSyncConfig`
- same for removal (stopping push redirector is already possible via a different hot-reloaded config)
- changing anything about a large/small relationship is likely to be very complicated under the best circumstances of everything being down, let alone during a hot reload. This means that target repo cannot be changed via this mechanizm.

Essentially, the goal is only to be able to do a live change of how paths change between repos.

Reviewed By: StanislavGlebik

Differential Revision: D21904799

fbshipit-source-id: e40e6a9c39f4f03a436bd974f3cba26c690c5f27
2020-06-17 04:46:23 -07:00
..
getbundle_response mononoke: add a warning for slow getbundle calls 2020-06-11 08:57:18 -07:00
mononoke_repo migrate fetch_skiplist_index to async/await syntax 2020-06-15 08:14:36 -07:00
obsolete mononoke/repo_client: make repo_client buildable in OSS 2020-05-06 06:11:02 -07:00
remotefilelog mononoke: return FilenodeResult from get_all_filenodes_maybe_stale 2020-06-10 19:29:16 -07:00
repo_read_write_status mononoke/repo_client: make repo_client buildable in OSS 2020-05-06 06:11:02 -07:00
reverse_filler_queue unbundle: save infinitepush unbundles into reversefillerqueue 2020-05-07 05:12:14 -07:00
schemas reversefillerqueue: change bundle from varchar to varbinary 2020-05-20 07:34:22 -07:00
scribe_commit_queue repo_client: log infinitepush commits to scribe 2020-06-15 06:32:55 -07:00
src push_redirector: instantiate at request start 2020-06-17 04:46:23 -07:00
streaming_clone mononoke/repo_client: make repo_client buildable in OSS 2020-05-06 06:11:02 -07:00
unbundle push_redirector: instantiate at request start 2020-06-17 04:46:23 -07:00
wirepack mononoke/repo_client: make repo_client buildable in OSS 2020-05-06 06:11:02 -07:00
Cargo.toml RFC: introduce FilenodeResult 2020-06-01 05:27:34 -07:00