sapling/eden/mononoke/cmds
Thomas Orozco f5d4e0b5f7 manifold/client: take IOBufShared data as input for writes
Summary:
Currently, we take a `&mut (dyn Buf + Send)` as input when writng to Manifold.
This has a couple of downsides:

- It's not very ergonomic. From the API it's not obvious what mutations are
  going to be done on your `Buf` exactly (it's going to be consumed entirely),
  and it often results in code that's a little clumsy (see what I had to change
  here), where make calls like `write(&key, &mut mydata.clone())`.
- It limits what we can do with it. If you already have a `IOBufShared` on
  hand, you shouldn't need to copy it in order to pass it to Manifold, but
  currently the Manifold client code does have to copy it because all it sees
  is a `dyn Buf`.

This diff updates the client to take a `IOBufShared` directly, which has plenty
of convenient `From<...>` conversions (and some efficient ones like
`From<Bytes>`, which doesn't copy the `Bytes` at all).

Reviewed By: ahornby, Imxset21

Differential Revision: D28535539

fbshipit-source-id: bba1b963a96350ad57cc0fbfcc31f7e1eb36c317
2021-05-19 09:57:20 -07:00
..
admin mononoke: sample size metadata for all component blobstores 2021-05-10 06:07:59 -07:00
backfill_derived_data mononoke/backfill_derived_data: limit concurrency of unodes warmup 2021-05-04 05:32:07 -07:00
benchmark_storage_config mononoke: sample size metadata for all component blobstores 2021-05-10 06:07:59 -07:00
blobstore_healer mononoke: sample size metadata for all component blobstores 2021-05-10 06:07:59 -07:00
bonsai_verify mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
copy_blobstore_keys mononoke: sync changeset implementation for megarepo 2021-05-13 10:04:21 -07:00
manual_scrub mononoke: switch manual_scrub to buffered_unordered 2021-05-17 01:13:57 -07:00
packer Teach the packer to do multiple packs in a single process 2021-05-19 03:32:40 -07:00
sqlblob_gc mononoke: update to tokio 1.x 2021-04-28 07:36:31 -07:00
streaming_clone_warmup mononoke: sample size metadata for all component blobstores 2021-05-10 06:07:59 -07:00
aliasverify.rs changesets: remember repo_id in changesets 2021-04-29 06:11:20 -07:00
backfill_mapping.rs mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
benchmark_filestore.rs mononoke: simplify manifoldblob construction 2021-05-17 04:00:58 -07:00
blobimport.rs manifold/client: take IOBufShared data as input for writes 2021-05-19 09:57:20 -07:00
configlint.rs mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
dumprev.rs mononoke: remove unnecessary .version("0.0.0") in clap App setup 2020-11-06 02:23:46 -08:00
idxdump.rs mononoke: remove unnecessary .version("0.0.0") in clap App setup 2020-11-06 02:23:46 -08:00
lfs_import.rs mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
populate_healer.rs mononoke: simplify manifoldblob construction 2021-05-17 04:00:58 -07:00
rechunker.rs mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
revlogrepo.rs mononoke: remove unnecessary .version("0.0.0") in clap App setup 2020-11-06 02:23:46 -08:00
segmented_changelog_seeder.rs mononoke: remove async on FbConstruct methods 2021-04-28 11:14:52 -07:00
segmented_changelog_tailer.rs Remove cachelib setup from segemented_changelog_tailer 2021-05-07 12:24:22 -07:00
statistics_collector.rs mononoke: update to tokio 1.x 2021-04-28 07:36:31 -07:00
upload_globalrevs.rs mononoke: remove async on FbConstruct methods 2021-04-28 11:14:52 -07:00