sapling/eden/mononoke
Thomas Orozco 275e4eff76 mononoke/mercurial: remove incorrect FileBytes Extend implementation
Summary:
This removes the Extend implementation for FileBytes, which was incorrect (it
discarded existing data!). I had introduced this as a backwards compatibility
shim when doing the Bytes 0.4 to Bytes 0.5 migration :/

We don't really need this shim, considering:

- The only place that really matters that uses this is the remotefilelog crate,
  where we have a content id, and where we should use `filestore::fetch_concat`
  instead.
- The other places are tests (or close to abandonware...), which can do their
  own folding.

Longer term, I'd like to remove the whole `Content` stream in hg entries, so
those callsites can use the filestore methods, which a) have test coverage
(unlike ad-hoc folds, which don't always do), and b) are more efficient since
they know how large the destination buffer needs to be ahead of time, and don't
need to re-allocate.

To make sure this fixes the bug, I also introduced tests for the remotefilelog
crate. As expected, the chunked variant fails without this fix.

Reviewed By: mitrandir77

Differential Revision: D20248978

fbshipit-source-id: 1b554d3e595eb867b6b6cf4204d31f27dd90a111
2020-03-04 08:51:42 -08:00
..
apiserver rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
benchmark mononoke/microwave: create repository snapshots for faster cache warmup 2020-03-04 04:02:18 -08:00
blobimport_lib/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
blobrepo mononoke/mercurial: remove incorrect FileBytes Extend implementation 2020-03-04 08:51:42 -08:00
blobrepo_utils mononoke (+ rust/shed/async_unit): update async_unit to expect async fn's 2020-02-18 01:55:00 -08:00
blobstore rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
blobstore_sync_queue mononoke/blobstore_sync_queue: delete in smaller batches 2020-02-20 12:26:50 -08:00
bonsai_git_mapping rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
bonsai_globalrev_mapping rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
bonsai_hg_mapping rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
bookmarks rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
cache_warmup/src mononoke/cache_warmup: remove tracing 2020-03-04 04:02:19 -08:00
changesets mononoke: convert places that talk to Memcache to Bytes 0.5 2020-02-26 03:30:47 -08:00
cmdlib rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
cmds mononoke/mercurial: remove incorrect FileBytes Extend implementation 2020-03-04 08:51:42 -08:00
commit_rewriting rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
common rust: Move futures-old rdeps to renamed futures-old 2020-03-02 21:02:50 -08:00
derived_data rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
edenapi_server/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
fastreplay/src mononoke/fastreplay: don't sample errors 2020-03-04 08:43:26 -08:00
filenodes mononoke/microwave: create repository snapshots for faster cache warmup 2020-03-04 04:02:18 -08:00
filestore/src mononoke: update internals to Bytes 0.5 2020-02-27 08:08:28 -08:00
git rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
gotham_ext/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
hgcli rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
hgproto rust: Begin upgrading to bytes 0.5 2020-02-18 21:20:09 -08:00
hook_tailer rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
hooks rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
lfs_import_lib/src mononoke: update internals to Bytes 0.5 2020-02-27 08:08:28 -08:00
lfs_protocol autocargo: Strip line comments 2020-02-26 16:31:52 -08:00
lfs_server/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
manifest rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
mercurial mononoke/mercurial: remove incorrect FileBytes Extend implementation 2020-03-04 08:51:42 -08:00
metaconfig RFC: mononoke: introduce unodes v2 2020-03-02 05:27:31 -08:00
microwave mononoke/microwave: create repository snapshots for faster cache warmup 2020-03-04 04:02:18 -08:00
mononoke_api/src mercurial_types: make envelope functions use generics instead of trait objects 2020-03-03 15:11:04 -08:00
mononoke_types RFC: mononoke: introduce unodes v2 2020-03-02 05:27:31 -08:00
newfilenodes mononoke/microwave: create repository snapshots for faster cache warmup 2020-03-04 04:02:18 -08:00
phases rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08: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/mercurial: remove incorrect FileBytes Extend implementation 2020-03-04 08:51:42 -08:00
revset rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
scs_server/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
segmented_changelog/src rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
server rust: Rename futures_preview:: to futures:: 2020-03-03 11:01:20 -08:00
sshrelay autocargo: Strip line comments 2020-02-26 16:31:52 -08:00
tests mononoke/mercurial: remove incorrect FileBytes Extend implementation 2020-03-04 08:51:42 -08:00
walker/src mononoke/walker: disable filenodes SQL timeouts 2020-03-04 03:20:26 -08:00
Cargo.toml autocargo: Strip line comments 2020-02-26 16:31:52 -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