Levi Tamasi
fe56cb9aa0
Eliminate some allocations/copies around the blob cache ( #10647 )
...
Summary:
Historically, `BlobFileReader` has returned the blob(s) read from the file
in the `PinnableSlice` provided by the client. This interface was
preserved when caching was implemented for blobs, which meant that
the blob data was copied multiple times when caching was in use: first,
into the client-provided `PinnableSlice` (by `BlobFileReader::SaveValue`),
and then, into the object stored in the cache (by `BlobSource::PutBlobIntoCache`).
The patch eliminates these copies and the related allocations by changing
`BlobFileReader` so it returns its results in the form of heap-allocated `BlobContents`
objects that can be directly inserted into the cache. The allocations backing
these `BlobContents` objects are made using the blob cache's allocator if the
blobs are to be inserted into the cache (i.e. if a cache is configured and the
`fill_cache` read option is set). Note: this PR focuses on the common case when
blobs are compressed; some further small optimizations are possible for uncompressed
blobs.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/10647
Test Plan: `make check`
Reviewed By: riversand963
Differential Revision: D39335185
Pulled By: ltamasi
fbshipit-source-id: 464503d60a5520d654c8273ffb8efd5d1bcd7b36
2022-09-08 12:40:18 -07:00
..
2022-09-08 12:40:18 -07:00
2022-09-07 22:52:42 -07:00
2022-09-07 22:52:42 -07:00
2022-08-19 11:51:12 -07:00
2022-09-02 09:51:19 -07:00
2022-09-02 09:51:19 -07:00
2022-07-17 07:13:59 -07:00
2022-07-14 21:49:34 -07:00
2022-07-17 07:13:59 -07:00
2022-09-02 09:51:19 -07:00
2022-08-31 17:47:07 -07:00
2022-08-31 17:47:07 -07:00
2022-07-14 21:49:34 -07:00
2022-08-10 17:34:38 -07:00
2022-06-13 11:08:50 -07:00
2022-05-02 10:22:08 -07:00
2022-08-10 17:34:38 -07:00
2022-05-06 13:03:58 -07:00
2022-08-31 21:03:52 -07:00
2022-09-07 22:52:42 -07:00
2022-06-28 16:08:30 -07:00
2022-09-02 09:51:19 -07:00
2022-07-28 17:07:36 -07:00
2022-01-27 13:01:09 -08:00
2021-07-23 08:38:45 -07:00
2022-06-01 11:02:27 -07:00
2022-06-23 09:42:18 -07:00
2022-05-04 10:19:53 -07:00
2020-06-15 10:47:02 -07:00
2022-06-27 16:37:09 -07:00
2021-11-08 11:05:59 -08:00
2022-05-06 13:03:58 -07:00
2022-05-06 13:03:58 -07:00
2022-09-02 09:51:19 -07:00
2022-09-02 09:51:19 -07:00
2022-05-06 13:03:58 -07:00
2022-08-12 13:51:32 -07:00
2022-05-06 13:03:58 -07:00
2022-03-04 11:35:28 -08:00
2022-08-19 11:51:12 -07:00
2022-08-04 00:42:13 -07:00
2021-07-23 08:38:45 -07:00
2022-06-22 15:45:21 -07:00
2022-06-28 13:52:35 -07:00
2022-09-02 09:51:19 -07:00
2022-06-17 16:40:47 -07:00
2022-05-24 12:14:10 -07:00
2022-05-27 07:23:31 -07:00
2022-08-25 18:52:37 -07:00
2021-09-07 13:28:29 -07:00
2022-09-07 22:52:42 -07:00
2021-07-23 08:38:45 -07:00
2022-09-07 22:52:42 -07:00
2022-09-02 09:51:19 -07:00
2022-07-15 19:01:30 -07:00
2022-08-05 13:16:58 -07:00
2022-05-06 13:03:58 -07:00
2022-08-04 12:14:28 -07:00
2022-06-30 10:16:03 -07:00
2022-07-31 11:39:16 -07:00
2022-05-19 18:39:41 -07:00
2022-05-19 18:39:41 -07:00
2022-08-17 15:53:40 -07:00
2022-08-25 12:53:46 -07:00
2022-07-14 10:09:31 -07:00
2022-07-14 10:09:31 -07:00
2022-09-02 09:51:19 -07:00
2022-05-06 13:03:58 -07:00
2022-09-06 12:59:02 -07:00
2022-07-21 13:35:36 -07:00
2022-07-21 13:35:36 -07:00
2022-08-12 13:08:50 -07:00
2021-12-08 14:30:57 -08:00
2022-08-29 17:35:21 -07:00
2022-09-07 22:52:42 -07:00
2022-08-01 17:56:13 -07:00
2022-05-19 11:04:21 -07:00
2022-05-06 13:03:58 -07:00
2021-12-13 09:00:36 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2022-05-05 13:08:21 -07:00
2022-03-30 15:55:31 -07:00
2022-08-05 12:02:33 -07:00
2022-08-19 11:51:12 -07:00
2022-07-14 21:49:34 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2022-01-12 09:31:12 -08:00
2022-08-05 12:02:33 -07:00
2022-07-14 10:09:31 -07:00
2022-03-11 16:13:23 -08:00
2022-08-11 12:45:50 -07:00
2022-08-11 12:45:50 -07:00
2022-08-11 12:45:50 -07:00
2022-08-25 18:52:37 -07:00
2022-07-13 20:54:49 -07:00
2022-04-14 11:11:04 -07:00
2022-08-12 13:51:32 -07:00
2022-05-06 13:03:58 -07:00
2022-02-17 16:19:31 -08:00
2022-07-25 16:27:26 -07:00
2022-07-25 16:27:26 -07:00
2022-07-25 16:27:26 -07:00
2022-08-10 10:19:20 -07:00
2022-06-22 15:45:21 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2021-09-29 04:04:40 -07:00
2021-09-07 11:31:59 -07:00
2020-02-20 12:09:57 -08:00
2022-08-10 17:34:38 -07:00
2022-08-19 11:51:12 -07:00
2022-09-02 09:51:19 -07:00
2022-09-02 09:51:19 -07:00
2022-08-19 11:51:12 -07:00
2022-08-19 11:51:12 -07:00
2021-05-10 12:50:25 -07:00
2021-11-19 17:53:47 -08:00
2022-06-25 15:30:47 -07:00
2021-11-19 17:53:47 -08:00
2020-02-20 12:09:57 -08:00
2022-01-04 16:45:49 -08:00
2022-05-06 13:03:58 -07:00
2020-12-23 16:55:53 -08:00
2021-09-29 04:04:40 -07:00
2021-09-29 04:04:40 -07:00
2022-08-10 17:34:38 -07:00
2022-08-25 18:52:37 -07:00
2022-08-25 18:52:37 -07:00
2022-08-25 18:52:37 -07:00
2022-08-04 00:42:13 -07:00
2022-05-06 13:03:58 -07:00
2022-06-10 16:07:03 -07:00
2021-09-10 10:00:26 -07:00
2022-05-06 13:03:58 -07:00
2021-10-06 07:48:31 -07:00
2022-09-02 09:51:19 -07:00
2022-09-02 09:51:19 -07:00
2022-09-02 09:51:19 -07:00
2021-10-06 07:48:31 -07:00
2022-08-29 19:09:29 -07:00
2021-06-18 04:57:27 -07:00
2021-09-10 10:00:26 -07:00
2022-09-07 22:52:42 -07:00
2022-09-07 22:52:42 -07:00
2022-08-25 18:52:37 -07:00
2022-07-15 19:01:30 -07:00
2022-07-15 19:01:30 -07:00
2022-05-17 09:39:22 -07:00
2020-02-20 12:09:57 -08:00
2022-06-10 16:07:03 -07:00
2022-09-07 22:52:42 -07:00
2022-09-07 22:52:42 -07:00
2022-09-07 22:52:42 -07:00
2022-08-10 10:19:20 -07:00
2021-03-25 15:00:45 -07:00
2021-11-19 11:37:06 -08:00
2022-05-24 10:28:57 -07:00
2022-04-14 17:12:16 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2022-08-01 17:56:13 -07:00
2022-09-07 22:52:42 -07:00
2022-06-14 13:06:40 -07:00
2022-06-20 20:58:11 -07:00
2021-06-10 12:55:20 -07:00
2022-08-01 17:56:13 -07:00
2022-08-01 17:56:13 -07:00
2022-09-07 22:52:42 -07:00
2022-08-17 13:51:39 -07:00
2022-08-29 17:35:21 -07:00
2022-09-07 22:52:42 -07:00
2022-09-07 22:52:42 -07:00
2022-08-29 17:35:21 -07:00
2022-07-21 13:35:36 -07:00
2022-07-21 13:35:36 -07:00
2022-07-21 13:35:36 -07:00
2022-08-10 17:34:38 -07:00
2022-06-08 14:16:43 -07:00
2022-06-08 14:16:43 -07:00
2020-02-20 12:09:57 -08:00
2022-07-05 15:44:35 -07:00
2022-08-05 12:02:33 -07:00
2022-07-05 15:44:35 -07:00
2022-08-10 17:34:38 -07:00
2020-02-20 12:09:57 -08:00
2021-03-18 09:47:31 -07:00
2021-03-18 09:47:31 -07:00
2022-05-18 00:41:41 -07:00
2022-08-02 14:52:10 -07:00
2022-08-02 14:52:10 -07:00