Peter Dillinger
82794e0a4f
Deprecate RangePtr, favor new RangeOpt and OptSlice ( #13481 )
...
Summary:
The new API in https://github.com/facebook/rocksdb/issues/13453 is awkward and precarious because of using RangePtr, which encodes optional keys using raw pointers to Slice. We could use `std::optional<Slice>` instead but that is unsatisfyingly a larger object with an inefficient size (typically 17 bytes).
Here I introduce a custom optional Slice type, `OptSlice`, that is the same size as a Slice, and use it in a number of places to clean up code and make some public APIs easier to work with. This includes
* `atomic_replace_range` (not yet released, OK to change)
* `GetAllKeyVersions()` which gets a behavior change because of its unusual handling of empty keys.
* `DeleteFilesInRanges()`
* TODO in follow-up: `CompactRange()`
Most of the diff is associated updates and refactorings. Also
* Move some relevant things out of db.h to keep it as tidy as possible.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/13481
Test Plan: tests updated
Reviewed By: hx235
Differential Revision: D71747774
Pulled By: pdillinger
fbshipit-source-id: b4c8519608d119b8bceca9bb0fd778608f62a141
2025-03-24 17:08:17 -07:00
..
2025-03-14 21:43:50 -07:00
2025-03-24 17:08:17 -07:00
2025-03-24 17:08:17 -07:00
2024-12-19 10:58:40 -08:00
2025-02-21 12:42:14 -08:00
2025-02-11 19:36:47 -08:00
2024-04-16 08:45:38 -07:00
2024-11-04 18:06:07 -08:00
2025-03-14 21:43:50 -07:00
2024-06-18 10:51:29 -07:00
2025-01-16 15:46:37 -08:00
2025-01-24 22:28:41 -08:00
2024-04-16 08:45:38 -07:00
2024-11-18 11:23:17 -08:00
2025-03-07 14:56:45 -08:00
2025-03-07 14:56:45 -08:00
2025-03-07 14:56:45 -08:00
2024-12-19 10:58:40 -08:00
2024-03-04 10:08:32 -08:00
2023-08-08 17:26:50 -07:00
2025-03-24 17:08:17 -07:00
2025-03-18 18:40:33 -07:00
2024-12-19 10:58:40 -08:00
2025-03-24 17:08:17 -07:00
2025-02-04 12:03:32 -08:00
2025-02-20 10:16:12 -08:00
2023-05-18 13:25:01 -07:00
2024-03-22 13:40:42 -07:00
2025-03-24 17:08:17 -07:00
2024-12-19 10:58:40 -08:00
2024-12-19 10:58:40 -08:00
2025-01-15 13:11:40 -08:00
2024-05-30 14:53:13 -07:00
2024-08-12 21:09:37 -07:00
2024-02-05 10:26:41 -08:00
2022-06-27 16:37:09 -07:00
2024-12-17 16:36:04 -08:00
2024-01-05 11:53:57 -08:00
2024-03-14 15:44:55 -07:00
2024-11-27 16:45:59 -08:00
2024-10-16 12:34:57 -07:00
2025-02-11 19:36:47 -08:00
2024-08-08 13:34:11 -07:00
2024-12-19 10:58:40 -08:00
2023-01-27 13:14:19 -08:00
2024-08-19 13:53:25 -07:00
2025-02-18 11:01:19 -08:00
2025-03-24 17:08:17 -07:00
2025-03-07 14:56:45 -08:00
2024-06-18 10:46:55 -07:00
2024-05-29 15:03:15 -07:00
2024-12-19 10:58:40 -08:00
2023-10-18 09:38:38 -07:00
2025-03-07 14:56:45 -08:00
2024-12-19 10:58:40 -08:00
2024-12-19 10:58:40 -08:00
2025-03-24 17:08:17 -07:00
2024-12-19 10:58:40 -08:00
2025-02-04 12:03:32 -08:00
2025-03-07 14:56:45 -08:00
2025-03-07 14:56:45 -08:00
2025-03-24 17:08:17 -07:00
2024-12-19 10:58:40 -08:00
2025-02-18 09:37:03 -08:00
2025-01-24 14:06:54 -08:00
2024-02-07 10:44:11 -08:00
2022-05-19 18:39:41 -07:00
2022-05-19 18:39:41 -07:00
2024-12-19 10:58:40 -08:00
2024-05-21 10:17:34 -07:00
2024-07-22 14:27:31 -07:00
2024-11-22 17:53:35 -08:00
2025-03-24 17:08:17 -07:00
2025-01-24 22:28:41 -08:00
2024-06-26 18:17:05 -07:00
2025-01-02 10:51:02 -08:00
2024-12-19 16:57:51 -08:00
2024-12-19 10:58:40 -08:00
2023-01-27 13:14:19 -08:00
2025-03-19 12:08:06 -07:00
2025-03-24 17:08:17 -07:00
2025-03-24 17:08:17 -07:00
2025-03-24 17:08:17 -07:00
2025-03-21 15:55:41 -07:00
2024-07-15 10:28:34 -07:00
2022-11-02 14:34:24 -07:00
2023-07-03 09:41:48 -07:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2025-01-16 14:10:11 -08:00
2025-03-21 13:10:43 -07:00
2025-03-12 18:24:28 -07:00
2023-01-27 13:14:19 -08:00
2025-01-15 13:11:40 -08:00
2024-12-19 10:58:40 -08:00
2023-02-22 12:28:18 -08:00
2025-01-15 13:11:40 -08:00
2023-06-15 12:25:04 -07:00
2024-12-19 10:58:40 -08:00
2025-02-06 13:25:51 -08:00
2025-03-20 13:18:48 -07:00
2025-03-04 17:44:01 -08:00
2023-04-25 12:08:23 -07:00
2025-02-07 16:58:02 -08:00
2024-12-26 13:20:35 -08:00
2025-02-13 21:49:51 -08:00
2025-02-13 21:49:51 -08:00
2025-02-13 21:49:51 -08:00
2024-12-26 13:20:35 -08:00
2024-12-26 13:20:35 -08:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2024-02-07 10:44:11 -08:00
2024-12-19 10:58:40 -08:00
2024-12-06 13:29:52 -08:00
2024-12-06 13:29:52 -08:00
2023-12-04 11:17:32 -08:00
2025-01-16 14:10:11 -08:00
2025-01-16 14:10:11 -08:00
2025-01-16 14:10:11 -08:00
2025-02-20 20:21:45 -08:00
2025-02-20 20:21:45 -08:00
2025-02-10 17:15:47 -08:00
2022-10-31 22:28:58 -07:00
2024-03-14 15:44:55 -07:00
2023-12-05 14:07:42 -08:00
2023-09-11 16:32:32 -07:00
2025-02-10 16:46:13 -08:00
2024-11-04 18:06:07 -08:00
2024-10-20 20:53:08 -07:00
2025-01-15 13:11:40 -08:00
2023-12-04 11:17:32 -08:00
2024-01-31 16:30:26 -08:00
2024-01-31 16:30:26 -08:00
2024-02-29 15:08:26 -08:00
2024-02-07 10:44:11 -08:00
2024-03-04 06:32:50 -08:00
2024-12-19 10:58:40 -08:00
2024-02-07 10:44:11 -08:00
2025-02-27 11:37:56 -08:00
2022-06-10 16:07:03 -07:00
2024-12-19 10:58:40 -08:00
2022-10-25 11:33:04 -07:00
2023-02-22 12:28:18 -08:00
2024-03-22 13:40:42 -07:00
2024-03-22 13:40:42 -07:00
2022-12-19 15:06:22 -08:00
2024-01-29 11:37:34 -08:00
2024-10-14 12:28:35 -07:00
2024-12-19 10:58:40 -08:00
2025-03-21 13:10:43 -07:00
2025-03-24 17:08:17 -07:00
2025-03-04 17:44:01 -08:00
2025-03-04 17:44:01 -08:00
2024-10-25 09:32:14 -07:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2024-10-17 14:13:20 -07:00
2025-03-12 01:13:40 -07:00
2024-11-08 10:54:43 -08:00
2024-11-01 10:08:35 -07:00
2022-11-02 14:34:24 -07:00
2024-06-18 10:51:29 -07:00
2024-12-19 10:58:40 -08:00
2025-02-13 21:49:51 -08:00
2022-11-02 14:34:24 -07:00
2024-01-16 11:15:23 -08:00
2025-01-15 13:11:40 -08:00
2024-10-17 14:13:20 -07:00
2025-03-07 14:56:45 -08:00
2025-03-07 14:56:45 -08:00
2023-12-04 11:17:32 -08:00
2025-02-10 16:46:13 -08:00
2025-02-10 16:46:13 -08:00
2024-10-17 14:13:20 -07:00
2025-03-07 14:56:45 -08:00
2025-03-21 17:23:01 -07:00
2025-03-21 17:23:01 -07:00
2025-01-16 14:10:11 -08: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
2024-12-19 10:58:40 -08:00
2025-03-12 01:13:40 -07:00
2024-12-19 10:58:40 -08:00
2024-11-06 17:32:03 -08:00
2025-02-10 17:15:47 -08:00
2025-03-04 18:33:52 -08:00
2025-01-17 13:33:25 -08:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2023-04-05 14:42:31 -07:00
2024-01-29 10:38:08 -08:00
2024-12-05 15:00:17 -08:00
2024-12-05 15:00:17 -08:00