Peter Dillinger
f8c685c4fc
Check for and disallow shared key space in block caches ( #9172 )
...
Summary:
We have three layers of block cache that often use the same key
but map to different physical data:
* BlockBasedTableOptions::block_cache
* BlockBasedTableOptions::block_cache_compressed
* BlockBasedTableOptions::persistent_cache
If any two of these happen to share an underlying implementation and key
space (insertion into one shows up in another), then memory safety is
broken. The simplest case is block_cache == block_cache_compressed.
(Credit mrambacher for asking about this case in a review.)
With this change, we explicitly check for overlap and preemptively and
safely fail with a Status code.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9172
Test Plan: test added. Crashes without new check
Reviewed By: anand1976
Differential Revision: D32465659
Pulled By: pdillinger
fbshipit-source-id: 3876b45b6dce6167e5a7a642725ddc86b96f8e40
2021-11-16 11:16:05 -08:00
..
2021-11-08 11:05:59 -08:00
2021-11-10 10:49:04 -08:00
2021-11-15 12:52:18 -08:00
2021-06-16 16:51:38 -07:00
2021-09-29 04:04:40 -07:00
2021-11-03 08:43:27 -07:00
2021-09-16 17:23:36 -07:00
2021-10-11 18:03:01 -07:00
2021-10-11 18:03:01 -07:00
2021-11-08 11:05:59 -08:00
2021-11-15 12:52:18 -08:00
2021-09-08 12:22:04 -07:00
2021-03-29 17:10:42 -07:00
2020-10-28 23:22:27 -07:00
2021-05-05 14:00:17 -07:00
2021-11-08 11:05:59 -08:00
2021-10-18 23:32:01 -07:00
2021-11-08 11:05:59 -08:00
2021-11-16 11:16:05 -08:00
2021-09-27 07:43:47 -07:00
2021-07-23 08:38:45 -07:00
2021-11-01 14:36:31 -07:00
2021-09-21 09:23:48 -07:00
2021-07-23 08:38:45 -07:00
2021-10-16 10:04:32 -07:00
2021-11-02 21:54:29 -07:00
2021-07-30 12:16:44 -07:00
2020-06-15 10:47:02 -07:00
2021-07-23 08:38:45 -07:00
2021-11-08 11:05:59 -08:00
2021-05-05 14:00:17 -07:00
2021-09-01 14:28:58 -07:00
2021-06-16 16:51:38 -07:00
2021-09-29 04:04:40 -07:00
2021-07-23 08:38:45 -07:00
2021-09-12 15:34:26 -07:00
2021-08-10 11:10:07 -07:00
2020-12-09 21:21:16 -08:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-10-22 10:13:15 -07:00
2021-10-20 10:04:13 -07:00
2021-11-03 12:21:27 -07:00
2021-11-08 11:05:59 -08:00
2021-09-07 13:28:29 -07:00
2021-10-18 23:32:01 -07:00
2021-07-23 08:38:45 -07:00
2021-11-15 12:52:18 -08:00
2021-10-28 22:15:17 -07:00
2021-10-28 22:15:17 -07:00
2021-11-08 11:05:59 -08:00
2021-09-21 09:23:48 -07:00
2021-07-23 08:38:45 -07:00
2021-11-09 13:08:55 -08:00
2021-09-08 07:46:44 -07:00
2021-11-08 11:05:59 -08:00
2021-11-08 11:05:59 -08:00
2021-11-08 11:05:59 -08:00
2021-11-10 10:49:04 -08:00
2021-11-10 10:49:04 -08:00
2021-11-08 11:05:59 -08:00
2021-11-08 15:49:17 -08:00
2021-11-08 15:49:17 -08:00
2021-11-08 15:49:17 -08:00
2021-09-16 17:23:36 -07:00
2021-09-16 17:23:36 -07:00
2020-02-20 12:09:57 -08:00
2021-11-08 11:05:59 -08:00
2021-11-10 10:49:04 -08:00
2021-10-12 20:39:52 -07:00
2021-10-28 22:15:17 -07:00
2021-11-08 11:05:59 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2021-08-03 13:31:10 -07:00
2021-11-10 10:49:04 -08:00
2021-09-29 04:04:40 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2020-02-20 12:09:57 -08:00
2021-03-25 21:18:08 -07:00
2021-09-29 04:04:40 -07:00
2021-11-10 10:49:04 -08:00
2021-09-29 04:04:40 -07:00
2021-07-23 08:38:45 -07:00
2021-10-31 23:11:43 -07:00
2021-10-20 13:17:00 -07:00
2021-09-10 10:00:26 -07:00
2021-11-16 10:20:50 -08:00
2021-11-03 08:43:27 -07:00
2020-02-20 12:09:57 -08:00
2020-11-30 18:11:38 -08:00
2020-08-26 10:39:20 -07:00
2021-01-04 16:01:01 -08:00
2021-06-25 00:47:17 -07:00
2021-03-19 12:09:47 -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
2020-12-22 23:45:58 -08:00
2021-08-03 13:31:10 -07:00
2021-09-29 04:04:40 -07:00
2021-09-29 04:04:40 -07:00
2021-09-29 04:04:40 -07:00
2021-09-14 13:14:39 -07:00
2021-05-10 12:50:25 -07:00
2021-10-06 07:48:31 -07:00
2021-06-24 18:11:30 -07:00
2021-09-29 04:04:40 -07:00
2020-02-20 12:09:57 -08:00
2021-08-30 15:20:41 -07:00
2021-11-08 11:05:59 -08: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
2021-03-15 04:34:11 -07:00
2021-07-23 08:38:45 -07:00
2021-03-15 04:34:11 -07:00
2021-01-25 22:09:11 -08:00
2021-09-07 11:31:59 -07:00
2021-09-01 14:28:58 -07:00
2021-09-10 10:00:26 -07:00
2021-03-15 04:34:11 -07:00
2021-10-06 07:48:31 -07:00
2021-10-06 07:48:31 -07:00
2020-10-28 10:12:58 -07:00
2021-03-25 21:18:08 -07:00
2021-10-06 07:48:31 -07:00
2021-06-18 04:57:27 -07:00
2021-06-18 04:57:27 -07:00
2021-09-10 10:00:26 -07:00
2021-07-28 16:44:14 -07:00
2021-11-10 10:49:04 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2021-09-10 10:00:26 -07:00
2021-10-07 14:58:41 -07:00
2021-10-07 14:58:41 -07:00
2021-09-28 12:35:24 -07:00
2021-03-25 15:00:45 -07:00
2021-09-28 12:35:24 -07:00
2021-10-05 10:51:59 -07:00
2021-09-29 04:04:40 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2021-11-10 10:49:04 -08:00
2021-11-05 16:50:52 -07:00
2021-11-03 11:52:47 -07:00
2021-09-29 04:04:40 -07:00
2021-06-10 12:55:20 -07:00
2021-11-10 10:49:04 -08:00
2021-11-10 10:49:04 -08:00
2021-11-10 10:49:04 -08:00
2021-11-10 10:49:04 -08:00
2021-11-10 16:20:04 -08:00
2021-11-03 11:52:47 -07:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2021-09-21 09:23:48 -07:00
2021-07-30 12:16:44 -07:00
2021-07-30 12:16:44 -07:00
2020-02-20 12:09:57 -08:00
2021-09-14 13:14:39 -07:00
2021-09-01 14:28:58 -07:00
2021-09-14 13:14:39 -07:00
2021-07-07 11:14:05 -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
2021-03-18 09:47:31 -07:00
2021-04-21 13:54:02 -07:00
2021-06-18 17:14:51 -07:00