sapling/eden/mononoke
Kostia Balytskyi 23dee89ed0 mononoke: make commit validator manifest-diff-based
Summary:
Currently, x-repo commit validator runs full working copy comparison every time. This is slow, as it requires fetching of full manifests for the commit versions in both a small and a large repo. For those of leafs, which are different, filenodes are also fetched, so that `ContentId`s can be compared. It's slow. Because it's slow, we skip the majority of commits and validate only 1 in ~40 `bookmarks_update_log` entries. Obviously, this is not ideal.

To address this, this diff introduces a new way to run validation: based on comparing full manifest diffs. For each entry of the `bookmarks_update_log` of the large repo, we:
- unfold it into a list of commits it introduces into the repository
- fetch each commit
- see how it rewrites to small repos
- compute manifest differences between the commit and it's parent in each involved repo
- compare those differences
- check that topological order relationship remains sane (i.e. if `a` is a p1 of `b` in a small repo, than `a'` must be a p1 of `b'` in a large repo, where `a'` and `b'` are remappings of `a` and `b`)

In addition, this diff adds some integration tests and gets rid of the skipping logic.

Reviewed By: StanislavGlebik

Differential Revision: D20007320

fbshipit-source-id: 6e4647e9945e1da40f54b7f5ed79651927b7b833
2020-03-13 07:46:48 -07:00
..
apiserver mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
benchmark mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
blobimport_lib/src mononoke/filestore: update store_bytes to chunk content 2020-03-06 07:43:07 -08:00
blobrepo mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
blobrepo_utils mononoke: remove in_memory_writes* method 2020-03-10 07:51:28 -07:00
blobstore mononoke: fix integration test regression by reducing number of sqlite shards 2020-03-13 06:28:02 -07:00
blobstore_sync_queue mononoke/blobstore_sync_queue: delete in smaller batches 2020-02-20 12:26:50 -08:00
bonsai_git_mapping improve the check for conflicts during insert 2020-03-10 05:47:05 -07:00
bonsai_globalrev_mapping rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
bonsai_hg_mapping rust-shed: add no-op memcache_stub implementation to the shed 2020-03-10 01:07:46 -07:00
bookmarks mononoke: change error of log messages 2020-03-06 10:24:24 -08:00
cache_warmup/src mononoke/cache_warmup: conditionally use microwave for faster warmup 2020-03-05 11:57:43 -08:00
changesets rust-shed: add no-op memcache_stub implementation to the shed 2020-03-10 01:07:46 -07:00
cmdlib mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
cmds xdiff: allow rendering diff for large files 2020-03-12 04:27:23 -07:00
commit_rewriting mononoke: make commit validator manifest-diff-based 2020-03-13 07:46:48 -07:00
common rust-shed: add no-op memcache_stub implementation to the shed 2020-03-10 01:07:46 -07:00
config_structs/repos mononoke/server: add support for logging Scuba to a file 2020-03-12 11:16:07 -07:00
derived_data mononoke: log reponame to derived data scuba table 2020-03-10 11:42:31 -07:00
edenapi_server/src mononoke/{edenapi,lfs}_server: update to new Hyper, new Bytes, new Gotham 2020-03-11 10:22:28 -07:00
fastreplay/src mononoke/fastreplay: add an replay_outcome_permille counter 2020-03-12 08:18:11 -07:00
filenodes mononoke/microwave: create repository snapshots for faster cache warmup 2020-03-04 04:02:18 -08:00
filestore/src mononoke/filestore: update store_bytes to chunk content 2020-03-06 07:43:07 -08:00
git Replace deprecated rust-crypto in eden/mononoke/git/git_types 2020-03-12 13:56:37 -07:00
gotham_ext/src mononoke/{edenapi,lfs}_server: update to new Hyper, new Bytes, new Gotham 2020-03-11 10:22:28 -07:00
hgcli mononoke: allow selecting a priority in hgcli, and passing it to Mononoke 2020-03-11 08:54:51 -07:00
hgproto commands: add getcommitdata command 2020-03-12 14:36:12 -07:00
hook_tailer mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
hooks mononoke/server: add support for logging Scuba to a file 2020-03-12 11:16:07 -07:00
lfs_import_lib/src mononoke: update internals to Bytes 0.5 2020-02-27 08:08:28 -08:00
lfs_protocol mononoke/{edenapi,lfs}_server: update to new Hyper, new Bytes, new Gotham 2020-03-11 10:22:28 -07:00
lfs_server/src mononoke/lfs_server: get rid of futures-old, tokio-old, bytes-old 2020-03-11 10:22:28 -07:00
manifest rust: Rename tokio_preview:: to tokio:: 2020-03-05 14:25:10 -08:00
mercurial mercurial: add method for directly loading RevlogChangeset 2020-03-12 14:36:12 -07:00
metaconfig mononoke/server: add support for logging Scuba to a file 2020-03-12 11:16:07 -07:00
microwave mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
mononoke_api/src mononoke_api: use fbinit::compat_test 2020-03-12 12:34:07 -07:00
mononoke_types mononoke/filestore: update store_bytes to chunk content 2020-03-06 07:43:07 -08:00
newfilenodes rust-shed: add no-op memcache_stub implementation to the shed 2020-03-10 01:07:46 -07:00
phases rust-shed: add no-op memcache_stub implementation to the shed 2020-03-10 01:07:46 -07:00
pushrebase/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
reachabilityindex rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
repo_client mononoke: add stats collection for getcommitdata 2020-03-12 14:36:13 -07:00
revset rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
scs_server/src mononoke: add generate_placeholder_diff option 2020-03-12 12:00:26 -07:00
segmented_changelog/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
server mononoke: add stats collection for getcommitdata 2020-03-12 14:36:13 -07:00
sshrelay mononoke: allow selecting a priority in hgcli, and passing it to Mononoke 2020-03-11 08:54:51 -07:00
tests mononoke: make commit validator manifest-diff-based 2020-03-13 07:46:48 -07:00
walker/src mononoke: add repo name in BlobRepo 2020-03-10 08:32:33 -07:00
Cargo.toml blobstore: cover more blobstores to make them OSS buildable 2020-03-06 01:33:38 -08:00
README.md mononoke: add README.md and the missing pieces for supporting cargo (#13) 2020-02-13 00:12:36 -08:00

Mononoke

Mononoke is a next-generation server for the Mercurial source control system, meant to scale up to accepting thousands of commits every hour across millions of files. It is primarily written in the Rust programming language.

Caveat Emptor

Mononoke is still in early stages of development. We are making it available now because we plan to start making references to it from our other open source projects.

The version that we provide on GitHub does not build yet.

This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:

  • Full support for a standard cargo build.
  • Open source replacements for Facebook-internal services (blob store, logging etc).

The current goal is to get Mononoke working on Linux. Other Unix-like OSes may be supported in the future