sapling/eden/mononoke/blobstore/src
Yan Soares Couto 4ea7c5dd08 Optimise file copying between repos
Summary:
This optimises copying files between repos by using `Blobstore::copy` when possible, which can be more efficient, for example by using underlying Manifold methods, and avoiding loading data in memory to do the copy.

This was already done for snapshots, but now I made it more generic, and it should Just Work™ for anything that uses `blobsync::copy_file_content`. This includes the mirror commits binary.

In more detail, this diff did the following:
- Move `BlobCopier` trait to the blobstore lib itself, since it's generic enough.
- Provide an efficient implementation for RepoBlobstore, when the underlying blobstore is the same.
- Use that copier, and the previously-used-in-snapshots `filestore::copy` method.
- I also deleted `blobsync::copy_blob`, since it was unused, and if you look at the comments, it was trying to do what I did with `BlobCopier`.
- I had to start using new test libs in some tests, as they were manually incorrectly inserting files in the blobstore, which caused inconsistencies.

Reviewed By: mitrandir77

Differential Revision: D42707554

fbshipit-source-id: 6683be6d6602247992053f26a12d2e023f2376b4
2023-02-02 10:23:29 -08:00
..
counted_blobstore.rs reorder import groups 2022-08-04 13:24:30 -07:00
disabled.rs reorder import groups 2022-08-04 13:24:30 -07:00
errors.rs mononoke: fix license headers for rust files 2022-01-06 00:20:51 -08:00
lib.rs Optimise file copying between repos 2023-02-02 10:23:29 -08:00
macros.rs mononoke: fix license headers for rust files 2022-01-06 00:20:51 -08:00