sapling/bookmarks
Thomas Orozco 72fbf818e7 mononoke: hg sync job: Prefetch Bundle Data
Summary:
This introduces prefetching in the hg sync job, which allows us to separate two logically separate steps, and buffer between them:

- Fetching bundle data from Manifold so it can be replayed in Mercurial (we call this "preparing"). This can happen out of order.
- Submitting the changes to Mercurial. This must happen sequentially.

The upshot is that we can fetch new data from Manifold while we wait for Mercurial to apply it, which should increase our throughput.

 ---

This required a bit of refactoring for the main loop here. The reason for that is that, currently, we heavily rely on closures to capture the `log_entry` so we can pass it to Scuba, etc.

That doesn't work if we want to have buffering, because there isn't a single scope that represents

Instead, every step of the stream has its own scope, so we need to pass the `log_entry` through the stream itself. We also need to track the log entry in errors as well (e.g. to report them to Scuba).

Reviewed By: ikostia

Differential Revision: D15146682

fbshipit-source-id: f83284571f6ca90cb621c621c5165f7fbafd81b5
2019-05-21 12:25:28 -07:00
..
dbbookmarks Support hg-sync-bundle remains --without-blobimport 2019-05-21 12:25:25 -07:00
src mononoke: hg sync job: Prefetch Bundle Data 2019-05-21 12:25:28 -07:00
Cargo.toml Add Cargo.toml files to crates. (#7) 2018-07-09 19:52:27 -07:00